Jragon Posted July 11, 2011 Share Posted July 11, 2011 Hi! I'm trying to use the bing API thingy to search through a few results.... I can search 50 results but any higher and it gives me: PHP Notice: Undefined variable: returnValue in /var/www/lib/Msft/Bing/Search.php on line 738 PHP Notice: Undefined property: stdClass::$Web in /var/www/lib/bing.php on line 68 PHP Notice: Trying to get property of non-object in /var/www/lib/bing.php on line 68 PHP Warning: Invalid argument supplied for foreach() in /var/www/lib/bing.php on line 68 My code is: function __autoload($className) { $fileName = strtr($className,'_',DIRECTORY_SEPARATOR).".php"; include $fileName; return; } $apiKey = '0291518CA7B6C789903D60F8AEB4CD30194F1F07'; //$search = $_GET['search']; //if(isset($_GET['search'])){ $o = new Msft_Bing_Search($apiKey); $o->setQuery('photography') ->setSource('Web'); $raw = $o->search(); $result = json_decode($raw); foreach($result->SearchResponse->Web->Results as $value) { $feed = locateFeedUrl($value->Url); $fh = fopen('feeds.txt', 'a'); fwrite($fh, $feed . "\n"); } //} Link to comment https://forums.phpfreaks.com/topic/241725-odd-error-not-letting-me-search-more-than-50-results/ Share on other sites More sharing options...
QuickOldCar Posted July 11, 2011 Share Posted July 11, 2011 with the standard agreement is 50 results Link to comment https://forums.phpfreaks.com/topic/241725-odd-error-not-letting-me-search-more-than-50-results/#findComment-1241496 Share on other sites More sharing options...
Jragon Posted July 11, 2011 Author Share Posted July 11, 2011 Oh, D: Is there anyway to store upto 50 results then carry on after 50 and do another 50? Link to comment https://forums.phpfreaks.com/topic/241725-odd-error-not-letting-me-search-more-than-50-results/#findComment-1241509 Share on other sites More sharing options...
Jragon Posted July 13, 2011 Author Share Posted July 13, 2011 QuickOldCar, do you know of a way to start at 50, and go another 50? Link to comment https://forums.phpfreaks.com/topic/241725-odd-error-not-letting-me-search-more-than-50-results/#findComment-1242299 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.