$q=$_GET['q'];
$s=$_GET['s'];
if ((isset($_SERVER['REMOTE_ADDR'])) && (!eregi("72.",$_SERVER['REMOTE_ADDR']))) { die("YOUR ACCESS HAS BEEN DENIED.
http://www.iwebtool.com/"); }
if ($s=="msn") {
$msn_file = @file_get_contents("http://search.msn.com/results.aspx?q=".urlencode(trim(stripslashes($q)))."&format=xml&count=1") or die("ERROR 1");
$msn_total = split("\" total=\"",$msn_file); $msn_total = split("\"",$msn_total[1]); $msn_total=$msn_total[0];
echo "RESULT "; echo $msn_total; die();
}
if ($s=="yahoo") {
$yahoo_file = @file_get_contents("http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=iwebtool_trends&query=".urlencode(trim(stripslashes($q)))) or die("ERROR 2");
$yahoo_total = split("totalResultsAvailable=\"",$yahoo_file); $yahoo_total = split("\"",$yahoo_total[1]); $yahoo_total=$yahoo_total[0];
echo "RESULT "; echo $yahoo_total; die();
}
if ($s=="all") {
$yahoo_file = @file_get_contents("http://api.search.yahoo.com/SiteExplorerService/V1/inlinkData?appid=iwebtool_trends&entire_site=1&omit_inlinks=domain&query=".urlencode(trim(stripslashes($q)))) or die("ERROR 3");
$yahoo_total = split("totalResultsAvailable=\"",$yahoo_file); $yahoo_total = split("\"",$yahoo_total[1]); $yahoo_total=$yahoo_total[0];
echo "RESULT "; echo $yahoo_total; die();
}
?>