I am trying to integrate google adwords api in my website ,but it's display 
some errors 

code is :

error_reporting(-1);
ini_set('display_errors',1);
$path = dirname(__FILE__) . '/../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'adwordsAPI/src/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 AdGroupAdService.
  $adGroupAdService = $user->GetAdGroupAdService();

  $adGroupId = (float) '01';

  // Create selector.
  $selector = new Selector();
  $selector->fields = array('Id', 'AdGroupId', 'Status');
  $selector->ordering = array(new OrderBy('Id', 'ASCENDING'));

  // Create predicates.
  $adGroupIdPredicate = new Predicate('AdGroupId', 'IN', array($adGroupId));
  // By default disabled ads aren't returned by the selector. To return them
  // include the DISABLED status in a predicate.
  $statusPredicate =
  new Predicate('Status', 'IN', array('ENABLED', 'PAUSED', 'DISABLED'));
  $selector->predicates = array($adGroupIdPredicate, $statusPredicate);

  // Get all ads.
  $page = $adGroupAdService->get($selector);

  // Display ads.
  if (isset($page->entries)) {
foreach ($page->entries as $adGroupAd) {
  printf("Ad with id '%s', type '%s', and status '%s' was found.\n",
  $adGroupAd->ad->id, $adGroupAd->ad->AdType, $adGroupAd->status);
}
  } else {
print "No ads were found.\n";
  }
} catch (Exception $e) {
echo 'Inside catch exception';
  print $e->getMessage();
}

And Error is :


Warning: require_once(Google/Api/Ads/Common/Util/Logger.php): failed to 
open stream: No such file or directory in 
/var/www/vhosts/healthcampaign.in/httpdocs/smscampaign/pages/adwordsAPI/src/Google/Api/Ads/Common/Lib/AdsUser.php
 
on line 31 Fatal error: require_once(): Failed opening required 
'Google/Api/Ads/Common/Util/Logger.php' 
(include_path='.::/var/www/vhosts/healthcampaign.in/httpdocs/smscampaign/pages/../../src')
 
in 
/var/www/vhosts/healthcampaign.in/httpdocs/smscampaign/pages/adwordsAPI/src/Google/Api/Ads/Common/Lib/AdsUser.php
 
on line 31

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c4a71e2a-3666-43be-b7c2-925f19a413e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to