if ($media->MediaType == 'Image') { $dimensions = MapUtils::GetMap($media->dimensions); printf("Image with dimensions '%dx%d', MIME type '%s', and id '%s' " . "was found.\n", $dimensions['FULL']->width, $dimensions['FULL']->height, $media->mimeType, $media->mediaId); } else { if ($media->MediaType == 'Video') { printf("Video with name '%s' and id '%s' was found.\n", $media->name, $media->mediaId); } } } } else { print "No images or videos 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. GetAllImagesAndVideosExample($user); } catch (Exception $e) { printf("An error has occurred: %s\n", $e->getMessage()); }
public function testGetAllImagesAndVideosExample() { GetAllImagesAndVideosExample($this->user); }