|
ini_set('zlib.output_compression', 'Off');
ob_implicit_flush(TRUE);
?>
|
if ($_POST["keywords"]) {
if (function_exists("curl_init")){
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$params="mkt=us&lang=en_US&term=".$_POST["keywords"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://inventory.overture.com/d/searchinventory/suggestion/");
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
$rez = curl_exec ($ch);
if(curl_errno($ch)){
curl_close ($ch);
echo "Overture is slooooooooowww now";
return;
}
curl_close ($ch);
}elseif (function_exists("file")){
$rez=@file("http://inventory.overture.com/d/searchinventory/suggestion/?mkt=us&lang=en_US&term=".urlencode($_POST["keywords"]));
$rez=@implode("\r\n",$rez);
}elseif(function_exists("file_get_contents")){
$rez=@file_get_contents("http://inventory.overture.com/d/searchinventory/suggestion/?mkt=us&lang=en_US&term=".urlencode($_POST["keywords"]));
}
preg_match_all("/color=E8E8E8> (.*?)<\/a><\/td>/i",$rez,$keywords);
preg_match_all("/color=E8E8E8> (.*?)<\/td>/i",$rez,$count);
$i=0;
$k_found=$keywords[1][0];
$k_count=$count[1][0];
$aData[$i]["keyword"]=$k_found;
$aData[$i]["count"]=$k_count;
$hourly=number_format($k_count/732,2);
$dayly=number_format($k_count/30,2);
$week=number_format(str_replace(",","",$dayly)*7,2);
$year=number_format(str_replace(",","",$week)*52,2);
if ($k_count) {
$gresults = "";
$gresults = getgoogle($k_found);
echo "
";
}
preg_match_all("/color=#000000>(.*?)<\/a>/i",$rez,$keywords);
preg_match_all("/size=1> (.*?)<\/td>/i",$rez,$count);
$i=1;
foreach($keywords[1] as $key){
//$aData[$i]["keyword"]=$key;
$kcount=$count[1][$i-1];
$hourly=number_format($count[1][$i-1]/732,2);
$dayly=number_format($count[1][$i-1]/30,2);
$week=number_format(str_replace(",","",$dayly)*7,2);
$year=number_format(str_replace(",","",$week)*52,2);
$i++;
$gresults = "";
$gresults = getgoogle($key);
echo "
";
}
}
function getgoogle($kb) {
$kbr = str_replace(" ","+",$kb);
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.google.com/search?hl=en&q=%22$kbr%22");
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$resu = curl_exec ($ch);
if(curl_errno($ch)){
curl_close ($ch);
return;
}
curl_close ($ch);
$numb = array();
preg_match_all("/of about (.*?)<\/b>/i",$resu,$numb);
return $numb[1][0];
}
?>
|
|
Sponsored Ads
Earn $5,000+ Every Week Work P/T at Home, Simple Data Entry Only 30 mins a Day, Start Earning Now! LegitOnlinejob.com
Earn $3,200+ a Week Earn Money While in Your Pajamas - Turn Your Opinions to Cash Today! Surveysforcash.com
|
| |
|
|