Doesn't bring anything back. Please help - ads currently down. 

<?php

##############################################################
// 1) Set the include path
##############################################################

$path = "$DOCUMENT_ROOT/adwords-api/src";
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';

##############################################################
// 2) Create instance of user
##############################################################

$user = new AdWordsUser(NULL, $email, $password, $developerToken, 
$applicationToken, $userAgent, $clientId);
$user->SetClientId(null);

##############################################################
// 3) Create the campaign service
##############################################################

//$campaignService = $user->getCampaignService('v201109', 
'https://adwords.google.com');


 $campaignService =
         $user->GetCampaignService('v201109',
             'https://adwords-sandbox.google.com');


define('PAGE_SIZE', 500);

##############################################################
// 4) Get the campaigns
##############################################################

// Create selector

$selector = new Selector();
$selector->fields = array('Id', 'Name');
$selector->ordering[] = new OrderBy('Name', 'ASCENDING');

// Create paging controls.
$selector->paging = new Paging(0, PAGE_SIZE);

// Make the get request.
$page = $campaignService->get($selector);

// Display results

if (isset($page->entries)) {
foreach ($page->entries as $campaign) {
printf("Campaign with name '%s' and id '%s' was found.\n",
$campaign->name, $campaign->id);
}
}else {
print "No campaigns were found.\n";
}




?>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to