本文整理汇总了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";
}