Hello everyone. I'm having problems accessing to groups and keywords.
I have the following script in PHP that gives my all the campaigns...
But now i would like to have for all campaigns theirs groups, the
keywords associated with these groups... Can someone please help me ?
I've been searching and searching for ten hours and i can't get access
to groups and keywords ! Here is my code for the campaigns. Please
help !!!!
<?php
error_reporting(E_STRICT | E_ALL);
// You can set the include path to src directory or reference
// AdWordsUser.php directly via require_once.
// $path = '/path/to/aw_api_php_lib/src';
$path = dirname(__FILE__) . '/../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
try {
// Get AdWordsUser from credentials in "../auth.ini"
// relative to the AdWordsUser.php file's directory.
$user = new AdWordsUser();
// Log SOAP XML request and response.
$user->LogDefaults();
// Get the CampaignService.
$campaignService = $user->GetCampaignService();
// Get all campaigns.
$campaignPage = $campaignService->get(new CampaignSelector());
// Display campaigns.
if (isset($campaignPage->entries))
{
foreach ($campaignPage->entries as $campaign)
{
print 'Campaign with name "' . $campaign->name . '" and id
"'
. $campaign->id . "\" was found.<br/>";
}
}
else
{
print "No campaigns found.\n";
}
} catch (Exception $e) {
print_r($e);
}
?>
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en