Ich habe im Internet diesen Code gefunden: _http://http://blog.calevans.com/2010/06/01/bin…rapper-for-php/
PHP
<html> <head> <title> Cal's Bing Search QuickTest</title> <body><?PHPfunction __autoload($className){ $fileName = strtr($className,'_',DIRECTORY_SEPARATOR).".php"; include $fileName; return;} $apiKey = ''; $o = new Msft_Bing_Search($apiKey);$o->setQuery('zend framework') ->setWebCount(10) ->setSite('calevans.com') ->setSource('Web') ->setSource('Image') ->setAdult('Off'); $raw = $o->search();echo "<h2>Raw</h2>";echo "<textarea cols='100' >".$o->getUrl()."</textarea><br />";if ($o->getFormat()=='json') { $result = json_decode($raw);} else { $result = htmlspecialchars($raw);} echo "<h2>Images</h2>";foreach($result->SearchResponse->Image->Results as $value) { printf('<a href="%s"><img src="%s" /></a>',$value->Url,$value->MediaUrl);}echo "<br />";echo "<h2>Links</h2>";foreach($result->SearchResponse->Web->Results as $value) { printf('<a href="%s">%s</a><br />',$value->Url,$value->Title);} ?> </body></html>
APIKey eingegeben, aber den Code gibt trotzdem keine Ergebnise. Es zeigt auch keine Fehlermeldung.
Was soll ich noch machen?