/*
============================================================================================================
Version : 1.0
Description : Search Engine Saturation Tool
Copyright : (c) SeoBook.com, licensed under the GPL ( http://www.gnu.org/licenses/gpl.txt )
Function : Allows you to quickly view how many pages your site has in various search engines.
============================================================================================================
*/
include '../header.php';
set_time_limit(1000);
include 'clsGetNrRes.php';
$c = null;
if (isset($_REQUEST['c']) && !empty($_REQUEST['c'])) {
$c = (int) $_REQUEST['c'];
}
$urls = [];
if (isset($_REQUEST['urls']) && !empty($_REQUEST['urls'])) {
$urls = $_REQUEST['urls'];
}
if ($c === 1) {
$urlsx=array();
foreach($urls as $key=>$url)
{
if(strlen($url)>2)
{
$tmp=str_replace('http://','',$url);
$tmp=trim($tmp,'/');
$urlsx[]=$tmp;
}
}
$urls=$urlsx;
if(!count($urls) || count($urls) < 4) {
echo '
Please fill form
';
}
else {
$work=&New NrRes($url);
$res_1=$work->getRes2Array($urls[0]);//print_r($res_1);
if(strlen($urls[1])>0) $res_2=$work->getRes2Array($urls[1]);//print_r($res_2);
if(strlen($urls[2])>0) $res_3=$work->getRes2Array($urls[2]);//print_r($res_3);
if(strlen($urls[3])>0) $res_4=$work->getRes2Array($urls[3]);//print_r($res_4);
$stat=array();
$res_final=array();
$stat[$res_1['url']]=array($res_1);
if(strlen($urls[1])>0) $stat[$res_2[url]]=array($res_2);
if(strlen($urls[2])>0) $stat[$res_3[url]]=array($res_3);
if(strlen($urls[3])>0) $stat[$res_4[url]]=array($res_4);
//creating array with sites form db
$res_final[$res_1['total']]=$res_1['url'];
if(strlen($urls[1])>0) $res_final[$res_2[total]]=$res_2[url];
if(strlen($urls[2])>0) $res_final[$res_3[total]]=$res_3[url];
if(strlen($urls[3])>0) $res_final[$res_4[total]]=$res_4[url];
ksort($res_final);
include 'results.php';
}
}
function get_color($x)
{
if($x<=1000) return "#FFFFFF";
if($x<=5000 && $x>1000) return "#CDCA9C";
if($x<=20000 && $x>5000) return "#6299C5";
if($x<=100000 && $x>20000) return "#CD956A" ;
if($x<=500000 && $x>100000) return "#94CE62";
if($x>500000) return "#9C959C";
}
include 'form.php';
include 'source-info.php';
include '../footer.php';
?>