Tuesday, September 27, 2011

PHP Google PageRank Script

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

15 comments:

  1. 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.

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

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

    ReplyDelete
  4. Thanks for a good PR finder script !

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

    ReplyDelete
  6. thx for your script

    ReplyDelete
  7. Thanks. Tested this and works great.

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

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

    ReplyDelete
  10. Thank you so much. I downloaded it.

    ReplyDelete
  11. Thx for your script.

    ReplyDelete
  12. Thank you.......

    ReplyDelete
  13. Work perfect thanks man

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

    ReplyDelete
  15. Great! It sounds good. Thanks for sharing.. blog comments

    ReplyDelete