There are no known issues of including this script on your website, apart from some limited extra use of bandwidth. Please let us know if you would experience any problems because of this script.
Hitsplitter spreads Google queries randomly over many proxies. To increase query capacity (especially for the advanced version), we like more proxies.
Do you have a web server with php? You can help by donating a proxy:
Thank you.
<?php
// PHP 4 or higher
ini_set("user_agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");
// Execute query
$data = $_GET['data'];
$buffer = "";
if ($data != "") {
for ($i = 0; $i < count($data); $i++) {
$temp = explode("|", $data[$i]);
if (count($temp) == 1) {
preg_match("/\<b\>1\<\/b\> - \<b\>1\<\/b\>([a-zA-Z ]+)\<b\>([0-9.,]+)\<\/b\>/", file_get_contents("http://www.google.com/search?hl=en&q=" . $temp[0] . "&num=1"), $matches);
$hits = (count($matches) == 3) ? intval(str_replace(array('.', ','), "", $matches[2])) : 0;
$buffer .= "{'hits':" . $hits . "}";
}
if (count($temp) == 3) {
if ($buffer != "") $buffer .= ",";
preg_match("/\<b\>1\<\/b\> - \<b\>1\<\/b\>([a-zA-Z ]+)\<b\>([0-9.,]+)\<\/b\>/", file_get_contents("http://www.google.com/search?hl=en&as_q=" . $temp[1] . "&as_sitesearch=." . $temp[2] . "&num=1"), $matches);
$hits = (count($matches) == 3) ? intval(str_replace(array('.', ','), "", $matches[2])) : 0;
$buffer .= "{'id':" . intval($temp[0]) . ",'hits':" . $hits . "}";
}
if (count($temp) == 8) {
if ($buffer != "") $buffer .= ",";
preg_match("/\<b\>1\<\/b\> - \<b\>1\<\/b\>([a-zA-Z ]+)\<b\>([0-9.,]+)\<\/b\>/", file_get_contents("http://www.google.com/search?hl=en&as_q=" . $temp[1] . "&as_sitesearch=." . $temp[2] . "&lr=" . $temp[3] . "&cr=" . $temp[4] . "&as_filetype=" . $temp[5] . "&as_qdr=" . $temp[6] . "&as_occt=" . $temp[7] . "&num=1"), $matches);
$hits = (count($matches) == 3) ? intval(str_replace(array('.', ','), "", $matches[2])) : 0;
$buffer .= "{'id':" . intval($temp[0]) . ",'hits':" . $hits . "}";
}
}
// Return hits
if ($buffer != "") {
echo "{'results':[" . $buffer . "]};";
}
else {
echo "false";
}
}
else if ($_GET['test_site'] != "") {
echo file_get_contents("http://www.google.com/search?hl=en&q=" . $_GET['test_site'] . "&num=1");
}
else if ($_GET['test_hits'] != "") {
echo preg_match("/\<b\>1\<\/b\> - \<b\>1\<\/b\>([a-zA-Z ]+)\<b\>([0-9.,]+)\<\/b\>/", file_get_contents("http://www.google.com/search?hl=en&q=" . $_GET['test_hits'] . "&num=1"), $matches);
print_r($matches);
}
?>