$keyword = $data['KEYWORD_TEXT']->value; $search_volume = isset($data['SEARCH_VOLUME']->value) ? $data['SEARCH_VOLUME']->value : 0; if ($data['CATEGORY_PRODUCTS_AND_SERVICES']->value === null) { $categoryIds = ''; } else { $categoryIds = implode(', ', $data['CATEGORY_PRODUCTS_AND_SERVICES']->value); } printf("Keyword idea with text '%s', category IDs (%s) and average " . "monthly search volume '%s' was found.\n", $keyword, $categoryIds, $search_volume); } } else { print "No keywords ideas were found.\n"; } // Advance the paging index. $selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE; } while ($page->totalNumEntries > $selector->paging->startIndex); } // Don't run the example if the file is being included. if (__FILE__ != realpath($_SERVER['PHP_SELF'])) { return; } try { // Get AdWordsUser from credentials in "../auth.ini" // relative to the AdWordsUser.php file's directory. $user = new AdWordsUser(); // Log every SOAP XML request and response. $user->LogAll(); // Run the example. GetKeywordIdeasExample($user); } catch (Exception $e) { printf("An error has occurred: %s\n", $e->getMessage()); }
public function testGetKeywordIdeasExample() { GetKeywordIdeasExample($this->user); }