error_reporting(E_STRICT | E_ALL); // You can set the include path to src directory or reference // DfpUser.php directly via require_once. // $path = '/path/to/dfp_api_php_lib/src'; $path = dirname(__FILE__) . '/../../../../src'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php'; require_once dirname(__FILE__) . '/../../../Common/ExampleUtils.php'; try { // Get DfpUser from credentials in "../auth.ini" // relative to the DfpUser.php file's directory. $user = new DfpUser(); // Log SOAP XML request and response. $user->LogDefaults(); // Get the CreativeWrapperService. $creativeWrapperService = $user->GetCreativeWrapperService('v201403'); $labelId = 'INSERT_CREATIVE_WRAPPER_LABEL_ID_HERE'; // Create creative wrapper objects. $creativeWrapper = new CreativeWrapper(); $creativeWrapper->labelId = $labelId; $creativeWrapper->ordering = 'INNER'; $creativeWrapper->header = new CreativeWrapperHtmlSnippet(); $creativeWrapper->header->htmlSnippet = '<b>My creative wrapper header</b>'; $creativeWrapper->footer = new CreativeWrapperHtmlSnippet(); $creativeWrapper->footer->htmlSnippet = '<b>My creative wrapper footer</b>'; // Create the creative wrappers on the server. $creativeWrappers = $creativeWrapperService->CreateCreativeWrappers(array($creativeWrapper)); // Display results. if (isset($creativeWrappers)) { foreach ($creativeWrappers as $creativeWrapper) { printf("Creative wrapper with ID '%d' applying to label '%d' was" . " created.\n", $creativeWrapper->id, $creativeWrapper->labelId);