Ні, Evgeniy Your code become old and some methods are missing. I've changed this code and got this:
$user = new AdWordsUser(); $user->LogDefaults(); $targetingIdeaService = $user->GetService('TargetingIdeaService', 'v201402'); $keyword = 'mars cruise'; $selector = new TargetingIdeaSelector(); $selector->requestType = 'STATS'; $selector->ideaType = 'KEYWORD'; $selector->requestedAttributeTypes = array('COMPETITION'); // code below give this exception: Unmarshalling Error: cvc-type.2: The type definition cannot be abstract for element ns1:searchParameters. $relatedToQuerySearchParameter = new RelatedToQuerySearchParameter(); $relatedToQuerySearchParameter->queries = array($keyword); $selector->searchParameters[] = $relatedToQuerySearchParameter; //if do not use code above I have this error: [AuthenticationError.OAUTH_TOKEN_INVALID @ ; trigger:''] //could it be because my developer token is not registred yet? // Set selector paging (required by this service). $selector->paging = new Paging(0, 10); do { // code below gives this warning: Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /googleads-php-lib-master/src/Google/Api/Ads/Common/Util/CurlUtils.php on line 107 $page = $targetingIdeaService->get($selector); if (isset($page->entries)) { foreach ($page->entries as $targetingIdea) { $data = MapUtils::GetMap($targetingIdea->data); $competition = isset($data['COMPETITION']->value) ? $data['COMPETITION']->value : 0; echo($competition); } } else { print "No keywords ideas were found.\n"; } $selector->paging->startIndex += 10; } while ($page->totalNumEntries > $selector->paging->startIndex); I have added some comments that discribes my errors and warnings. Thanx for helping. Regards, Bohdan Kit -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 --- 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.