Background Top Border Background Middle Border

Search Engine Position

Shows your site’s placement in Google’s, MSN’s, Yahoo’s, search engine results for keywords you enter.

Your domain: (eg. yoursite.com)  
Search on: Check All

echo "
";
foreach($searchengines as $key => $engine) {
echo "

n";
}
echo "

";
/*
foreach($searchengines as $key => $engine) {

if($key%2 == 1)
echo "

";

echo "

n";

if($key%2 == 0)
echo "

";

}
*/
?>

$engine Search
$engine Search
 
Limit search to:
Keywords to search
(one per line):
 

if(strpos(@$_REQUEST['domain'],".")!==false && @$_REQUEST['keywords'] && checkImage() && $_REQUEST['searchengine'] != NULL) {

$domain = $_REQUEST['domain'];
$limit = $_REQUEST['limit'];
$searchenginebox = $_REQUEST['searchengine'];
$keywords = $_REQUEST['keywords'];

$keywords_clean = str_replace("r","",$keywords);
$keywords_clean = str_replace("t","",$keywords_clean);
$keywords_clean = trim($keywords_clean);

$keywordsarr = explode("n",$keywords_clean);

foreach($searchenginebox as $searchengine) {

$rand = rand(1,100000);

foreach($keywordsarr as $keyword) {

if($searchengine == 1) {

$content = file_get_contents("http://www.google.com/search?q=".urlencode($keyword)."&hl=en&num=$limit");
//preg_match_all("#

preg_match_all("#

$place = false;
$url = false;
foreach($urls[1] as $k=>$link)
{
if(preg_match("#\w+:/(/.+?\.|/)$domain/#i",$link))
{
$url = $link;
$place = $k+1;
break;
}
}
$page = ceil($place / 10);
$from = $page * 10;

# Output

if($place) {

$final[1][$keyword] = "#$place";

} else {

$final[1][$keyword] = "NO";

}

} elseif($searchengine == 2) {

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "./tmp/cookie".$rand.".txt");
curl_setopt($ch, CURLOPT_URL, "http://search.yahoo.com/search;_ylt=A0geu9gdX8JHkucA_myl87UF?p=".urlencode($keyword)."&ei=UTF-8&iscqry=&fr=sfp&n=$limit");
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
curl_close($ch);

$content = str_replace("n","",$content);
$content = str_replace("r","",$content);
$content = str_replace("t","",$content);

preg_match_all("/

$place = false;
$url = false;
foreach($urls[1] as $k=>$link)
{
if (strpos ($link, $domain) !==false)
{
$url = $link;
$place = $k+1;
break;
}
}
$page = ceil($place / 10);
$from = (($page * 10)+1)-11;

$url = preg_replace("/http://(.*)http%3a///","http://",$url);

# Output

if($place) {

$final[2][$keyword] = "#$place";

} else {

$final[2][$keyword] = "NO";

}

} elseif($searchengine == 3)

{
$final[3][$keyword] = "NO";
for($i = 0; $i < (floor($limit/10) + 1); $i++)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEFILE, "tmp/cookieforlive.txt");
if($i != 0)
{
curl_setopt($ch, CURLOPT_URL, "http://search.live.com/results.aspx?q=".urlencode($keyword)."&first=".$i."1");
} else
{
curl_setopt($ch, CURLOPT_URL, "http://search.live.com/results.aspx?q=".urlencode($keyword));
}
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
curl_close($ch);

//echo "";

//preg_match_all("/

.*

/Usmi",$content,$urls);
preg_match_all("/

  • $place = false;
    $url = false;
    $page = false;
    foreach($urls[1] as $k=>$link)
    {
    if (strpos ($link, $domain) !==false)
    // if(preg_match("#\w+:/(/.+?\.|/)$domain/#i",$link))
    {
    $url = $link;
    $place = ($i*10) + ($k+1);
    $page = $i;
    break;
    }
    }
    /*
    $page = ceil($place / 10);
    $from = (($page * 10)+1)-11;
    */
    if($page != 0) {
    $page = 1;
    } else {
    $page = ($i*10) - 9;
    }
    # Output

    if($place) {

    $final[3][$keyword] = "#$place";
    break;
    }
    }
    } /* elseif($searchengine == 4) {

    $content = file_get_contents("http://www.google.com/search?q=".urlencode($keyword)."&hl=en&num=$limit");
    //preg_match_all("#

    #",$content,$urls);
    preg_match_all("#

    $place = false;
    $url = false;
    foreach($urls[1] as $k=>$link)
    {
    if(preg_match("#\w+:/(/.+?\.|/)$domain/#",$link))
    {
    $url = $link;
    $place = $k+1;
    break;
    }
    }
    $page = ceil($place / 10);
    $from = $page;

    # Output

    if($place) {

    $final[4][$keyword] = "#$place";

    } else {

    $final[4][$keyword] = "NO";

    }

    } elseif($searchengine == 5) {

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cookieforaltavista.txt");
    curl_setopt($ch, CURLOPT_URL, "http://www.altavista.com/web/results?itag=ody&q=".urlencode($keyword)."&kgs=1&kls=0");
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $content = curl_exec($ch);
    curl_close($ch);

    preg_match_all("/
    /smi",$content,$urls);

    $place = false;
    $url = false;
    foreach($urls[1] as $k=>$link)
    {
    if(preg_match("#\w+:/(/.+?\.|/)$domain/#",$link))
    {
    $url = $link;
    $place = $k+1;
    break;
    }
    }
    $page = ceil($place / 10);
    $from = ($page * 10)-10;

    $url = preg_replace("/http://(.*)http%3a///","http://",$url);

    # Output

    if($place) {

    $final[5][$keyword] = "#$place";

    } else {

    $final[5][$keyword] = "NO";

    }

    } elseif($searchengine == 6) {

    $content = file_get_contents("http://www.alltheweb.com/search?advanced=1&cat=web&jsact=&_stype=norm&type=all&q=".urlencode($keyword)."&hits=$limit");

    preg_match_all("//Usmi",$content,$urls);

    $place = false;
    $url = false;
    foreach($urls[1] as $k=>$link)
    {
    if(preg_match("#\w+:/(/.+?\.|/)$domain/#",$link))
    {
    $url = $link;
    $place = $k+1;
    break;
    }
    }
    $page = ceil($place / 10);
    $from = (($page * 10)+1)-11;

    $url = preg_replace("/http://(.*)http%3a///","http://",$url);

    # Output

    if($place) {

    $final[6][$keyword] = "#$place";

    } else {

    $final[6][$keyword] = "NO";

    }

    }
    */
    }

    }

    echo "

    ";

    # We open the result table

    echo "

    ";

    # Here's the search engines columns

    foreach($searchenginebox as $searchengine) {

    # Here's our search engine row

    echo "

    ";

    }

    echo "

    ";

    # Here's the result columns per keyword

    foreach($keywordsarr as $keyword) {

    # Here's our keyword

    echo "

    ";

    echo "

    ";

    foreach($searchenginebox as $key => $searchengine) {

    # Here's our result

    //echo "

    ";
    echo "

    ";

    }

    echo "

    ";

    }

    # We close the result table

    echo "

      $searchengines[$searchengine]
    "$keyword"
    $domain
    ".$final[$key+1][$keyword]. " ".$final[$searchengine][$keyword]. "

    ";
    /*
    echo "
    ";
    print_r($searchenginebox);
    print_r($final);
    echo "

    ";
    */
    } else {
    echo '

    * All fields required.

    ';
    }
    ?>

  • This entry was posted in Web Tools and tagged , . Bookmark the permalink.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Background Bottom Border
    Background Top Border Background Middle Border Background Bottom Border

    Rendered template: single.php

    106 SQL queries done. Page generation took 1.504 seconds.