<?php
$wsurl = 'http://search.yahooapis.com/WebSearchService/V1/webSearch';
$appid = 'rlerdorf';
$q = urlencode("searchmonkeyid:com.yahoo.page.uf.hresume PHP");
$x = simplexml_load_file("$wsurl?appid=$appid&query=$q&results=100");
echo <<<EOB
Showing {$x['totalResultsReturned']} of {$x['totalResultsAvailable']}<br>
EOB;
foreach($x->Result as $ent) {
  echo "<a href=\"{$ent->Url}\">{$ent->Title}<br>\n";
}
?> 


Warning: simplexml_load_file(http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=rlerdorf&query=searchmonkeyid%3Acom.yahoo.page.uf.hresume+PHP&results=100) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/paul.slowgeek.com/hacku/examples/semantic.php on line 5

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=rlerdorf&query=searchmonkeyid%3Acom.yahoo.page.uf.hresume+PHP&results=100" in /var/www/paul.slowgeek.com/hacku/examples/semantic.php on line 5
Showing of

Warning: Invalid argument supplied for foreach() in /var/www/paul.slowgeek.com/hacku/examples/semantic.php on line 9