本文整理匯總了PHP中MCAPI::campaignUpdate方法的典型用法代碼示例。如果您正苦於以下問題:PHP MCAPI::campaignUpdate方法的具體用法?PHP MCAPI::campaignUpdate怎麽用?PHP MCAPI::campaignUpdate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MCAPI
的用法示例。
在下文中一共展示了MCAPI::campaignUpdate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: MCAPI
<?php
/**
This Example shows how to Update an A/B Split Campaign via the MCAPI class.
**/
require_once '../mcapi.php';
require_once 'config/config.inc.php';
//contains apikey
$api = new MCAPI($apikey);
$field = "absplit";
$value = "My New Title";
$ab_opts = array();
$ab_opts['split_test'] = 'from_name';
$ab_opts['pick_winner'] = 'manual';
$ab_opts['from_name_a'] = 'David Gilmour';
$ab_opts['from_email_a'] = 'david@example.org';
$ab_opts['from_name_b'] = 'Roger Waters';
$ab_opts['from_email_b'] = 'roger@example.org';
$retval = $api->campaignUpdate($campaignId, $field, $ab_opts);
if ($api->errorCode) {
echo "Unable to Update Campaign!";
echo "\n\tCode=" . $api->errorCode;
echo "\n\tMsg=" . $api->errorMessage . "\n";
} else {
echo "SUCCESS!\n";
}
示例2: MCAPI
<?php
/**
This Example shows how to Update a regular Campaign via the MCAPI class.
**/
require_once '../mcapi.php';
require_once 'config/config.inc.php';
//contains apikey
$api = new MCAPI($apikey);
$field = "title";
$value = "My New Title";
$retval = $api->campaignUpdate($campaignId, $field, $value);
if ($api->errorCode) {
echo "Unable to Update Campaign!";
echo "\n\tCode=" . $api->errorCode;
echo "\n\tMsg=" . $api->errorMessage . "\n";
} else {
echo "SUCCESS! \n";
}