PHP Google PageRank Script

Tuesday, September 27, 2011

Finding Google PageRank for multiple URLs is difficult process,  Here is the my solution to find Google PageRank for multiple URLs at the same time, PR Finder PHP Script here is the best solution for Finding PR for any web url. hope this very usefull for your projects.


PHP Google PageRank finder Script 

 Main Function (Download Full Script it Work like demo)

# Desc: function to check the Given URL with http:// and fetch PR
# Param: $url as String
# Depen: fetch_google_page_rank
# Return: Gogole Rank as Integer
function fetch_google_page_rank($url) {
 $url = strstr($url,"http://")? $url:"http://".$url;
    $fp = fsockopen("toolbarqueries.google.com", 80, $errno, $errstr, 30);
    if (!$fp) {
        echo "$errstr ($errno)<br />\n";
        } else {
        $out = "GET /tbl?client=navclient-auto&ch=".CheckHash(HashURL($url))."&features=Rank&q=info:".$url."&num=100&filter=0 HTTP/1.1\r\n";
        $out .= "Host: toolbarqueries.google.com\r\n";
        $out .= "User-Agent: Mozilla/4.0 (compatible; GoogleToolbar 2.0.114-big; Windows XP 5.1)\r\n";
        $out .= "Connection: Close\r\n\r\n";
        fwrite($fp, $out);

        while (!feof($fp)) {
            $data = fgets($fp, 128);
            $pos = strpos($data, "Rank_");
        if($pos === false){} else{
                $pagerank = substr($data, $pos + 9);
            }
        }
        fclose($fp);
        return (int)$pagerank;
    }
} 
Kindly Download the full Script
and Also checkout the New Updates of Page Rank Prediction from Google
Google Changes on Toolbar Queries to Find out Page Rank 

Download This Script     Live Demo     Download Script

14 comments:

Anonymous said...

Thanks a lot .. i was searching for this script very badly. i was trying to apply the SEOSTAT script but there script was generating some error. Thanks for this script really appericiate it.

eDirectories Technology Weblog said...

Thanks for this! I mentioned this Pagerank script in a post on my blog about the recent changes to the api url.

Anonymous said...

Hi I am Michel, This is the better script to find google PageRank, Thanks Guys.

Anonymous said...

Thanks for a good PR finder script !

Anonymous said...

Thanks really for that i was looking in google but i did't found nothing good

Anonymous said...

thx for your script

Anonymous said...

Thanks. Tested this and works great.

Darren Chow said...

This is great. I'm even able to integrated this with classic asp. Thanks!

Lakshmi Nair said...

This is too good. Thank you so much. Is there anything like this to find the keyword ranking in google ?

Ricky1990 said...

Thank you so much. I downloaded it.

Anonymous said...

Thx for your script.

Anonymous said...

Thank you.......

tome said...

Work perfect thanks man

pras said...

Thanks a lot..
I try to find this kind of script almost a week..

Post a Comment