Google RageRank Script

Update: See this script in action at

The Google PageRank is a scoring system created by Google to give websites a rank. Generally, the more popular your website is, the higher your pagerank is.

Google offers the pagerank lookup in a number of places including on their directory and on their toolbar. It wasn’t long before webmasters wanted to monitor or display their pagerank.

The idea of this is so you can display the Google pagerank of a website. This is mainly a webmaster tool, regular uses generally have little use for such information.

To begin with I found which offered an on-site pagerank lookup tool, the tool was offered as closed source and consequently created quite a presence in the industry because of this. Some time later, released the source code, which matched the source code found on the MobileRead Networks forum, which is where the original source code came from.

I used this script for quite some time, however over time I began using a combination of web servers with different operating systems and with different versions of apache and php.

I discovered that when I used this script on one server it would work fine, yet when I used it on another I discovered that google would throw me back a 403 – Forbidden error. At first, like others I believed this was due to google blocking the IP ranges of my servers therefore preventing abuse of the service.

This was wrong. I soon discovered this after checking the checksum generated by the toolbar, then the checksums generated on working servers and non-working servers.

The main issue was that my development server was running on a different platform than my production server. I discovered that the problem was down to the way the “ch” is generated by certain versions of PHP, and the way they handle bitwise operations.

The solution was to either use a perl script and pass the details back and forth via a PHP script, but this would be a very dirty way of doing what we want. The best option would be to produce a native PHP script that would function on all servers.

I tried to revive this concept in a number of places in an attempt to get a functional solution. I went back to where it began on the MobileRead Networks forum Pagerank thread. A user named “AboutSledge” offered a working solution, which was the Pagerank Checksum Caculator Source Code for Python, for C and for PHP.

This script works well, and have not experienced a problem generating a checksum. As a result of this I have created a user friendly script which uses the same algorithm which means you can display the pagerank on your site.


  1. Diego said,

    February 22, 2007 @ 12:00 am

    You are a genius!!!

    It finally worked on my weird server!! :-D Thanks man!

  2. stars said,

    February 22, 2007 @ 11:35 pm

    It does not work on my server. I downloaded the file pagerank.phps then change to pagerank.php and upload to my server and run it.But it display the blank page.Why does it happen like that?

  3. admin said,

    February 22, 2007 @ 11:37 pm

    stars, i’d check your apache access/error logs, also make sure you have PHP error reporting turned on.

    contact me direct for further help.

  4. Mark said,

    March 18, 2007 @ 1:26 pm

    Thanks a lot! It’s work.

  5. anon said,

    March 31, 2007 @ 12:07 am

    If you find this script does not work then this may be due to safe mode being enabled

    The script uses fsockopen();

  6. hammer said,

    April 4, 2007 @ 2:11 am

    stars said,

    February 22, 2007 @ 11:35 pm

    It does not work on my server. I downloaded the file pagerank.phps then change to pagerank.php and upload to my server and run it.But it display the blank page.Why does it happen like that?

    You need to make a change at the bottom of the page in the last 2 lines
    take away the // symbols in front of the line that has them at the beginning, save it, then retest it


  7. Nerve said,

    April 10, 2007 @ 7:52 pm

    1) The PageRank is displayed as a bar.If you click that bar…the browser will try to load the following page: where the is your host server for the script…and the is the page you requested for pagerank test. So the link will be if you click that bar.How can we change that into only ?

    2) admin: can you modify that script to show the number too ? as a result.. to appear that PageRank and the number next to it.
    or tell me what to modify in it.I am a PHP n00b :P

  8. upper said,

    April 12, 2007 @ 1:06 pm

    we modified that script a little bit and here is a new version of it :

    I don’t know if this will be the final version of it,but further updates will be available on our test site :)

  9. hm2k said,

    April 12, 2007 @ 3:30 pm

    If you insist on using my code, please at least give me credit.

  10. upper said,

    April 13, 2007 @ 5:03 am

    lol,I use your script just for fun.I am not earning money from it.
    Also, as you can see on my site,I do NOT offer your script to others,I just show you how it can be customized.

  11. Max said,

    April 26, 2007 @ 11:41 pm

    Hi, i tested the scripts with your code for this URL and did not work:

    Yes. It’s a Chinese language webpage and the URL was encoded to take a Chinese character. This page has page rank value 2 in Google tool bar, but it failed to pass your code.

    It was the same when I tested on Guess the algorithm cannot compute the correct PR value for this URL.

  12. helmut said,

    April 29, 2007 @ 10:43 pm

    ingenious it’s really helpful.
    Thank you

  13. Aukcje said,

    April 30, 2007 @ 7:10 pm

    Thanks a lot! It’s work.

  14. DT blogi said,

    May 3, 2007 @ 8:45 am

    PHP-skript Google PageRank’ide lugemiseks

    Google PageRank (PR) on suurus, mis näitab lehekülje tähtsust Google’i silmis kümne palli skaalal. Et DT lehekülgedel ka sellest aspektist silma peal hoida ning optimeerimise tulemusi jälgida, siis kirjutasin ühe lihtsa PHP-skripti, mis sitemap…

  15. kost said,

    May 4, 2007 @ 9:04 am

    Good script. Thank you.

  16. seoguy said,

    May 6, 2007 @ 10:24 am

    Thanks buddy… After a long research I found this page… before that I tried script , .. none of these are working .. All are giving the same old 403 error…
    Thanks again.. Is it ok to use image diractly from google??…

  17. said,

    May 25, 2007 @ 9:02 am

    i like php code for show page rank
    please help me
    have fun

  18. Fariz Tadjoedin said,

    June 8, 2007 @ 7:05 am

    Yes, it’s work, i love you :)

  19. General Web Directory said,

    June 8, 2007 @ 12:14 pm

    You can take the PageRank tool from a web directory script and then just modify it a little ! :)

  20. Faraz said,

    June 15, 2007 @ 11:48 pm

    Hi, I just uploaded the file on my server it is not working. please have a look another thing, please tell me which ares in php to customized? i have knowledge in html and css, not much with php. cheers faraz

  21. Googledirect meta search engine said,

    July 3, 2007 @ 8:21 pm

    Hi, want to confirm it really work on my site perfectly. I fully agree with your decision about differ chechsum by server. Thank you for your great wotk!

  22. Tobi said,

    July 12, 2007 @ 8:02 pm

    Thank you!!!

  23. gafeman said,

    July 13, 2007 @ 10:56 am

    ¡¡ you made a really good job !!

    i include it in my service, check it out:

    Grettings from Spain

  24. nasdev said,

    July 29, 2007 @ 5:12 pm

    your script is really work, nice
    other pagerank script is junk..i have tried and none of them works

  25. Sir said,

    July 31, 2007 @ 9:28 pm

    It works!!! Big thanks!

  26. bulernt said,

    August 13, 2007 @ 8:47 pm

    i do have a question about multiple data centers, has anyone tried to get pr from different data centers by this script?

  27. Des-X said,

    August 22, 2007 @ 10:06 pm

    THX. It works on 64bit Linux and Mac

  28. Rishiraj Singh said,

    August 30, 2007 @ 12:38 pm

    To NERVE,
    admin: can you modify that script to show the number too ? as a result.. to appear that PageRank and the number next to it.
    or tell me what to modify in it.I am a PHP n00b

    return $out.$out2;st look for the line
    // $out=’‘.$html.’‘; from bottom 7

    after that delete return $out and add following two lines and it will display number too. variable $pr hold pagerank value.

    $out2=”Your PageRank is “.$pr.”/10″;

  29. Samsher said,

    September 17, 2007 @ 3:23 pm

    What is the final working page rank script? I tried on my server but noticed nothing but a blank page.. pls help!


  30. figaro said,

    September 25, 2007 @ 7:39 pm

    Thank you for sharing. God bless and Godspeed.

  31. vic said,

    September 27, 2007 @ 3:48 pm

    great job, thank you very much

    for all those that couldn’t make it work

    DELETE THE // ON LINE 135 (the one before the last one)

  32. Julian said,

    October 10, 2007 @ 9:36 pm


    Looked around for this Google Pagerank script for quite a while.
    Finally found someone who did a good work.

  33. Raja Amer Khan said,

    October 31, 2007 @ 5:49 pm

    Many script i tried but didn’t work on my server. But you rock!!!

    Keep it up!! great job!!!

    many people sell scripts for money but your giving it for free!! thumbs up!

  34. said,

    November 1, 2007 @ 3:11 pm

    Aww! I’ve been scouring the internet for scripts just like this. I would like to run a “php page rank checker script” WITHIN a wordpress post. To run php codes in a Wordpress post, I used plugin.

    I guess this HM2K’s script and Wordpress’ runPHP script doesn’t play well together. I get an error like this:

    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/mydeskbl/public_html/wp-content/plugins/runPHP/runPHP.php(410) : eval()’d code on line 78

    Warning: fsockopen() [function.fsockopen]: unable to connect to :80 in /home/mydeskbl/public_html/wp-content/plugins/runPHP/runPHP.php(410) : eval()’d code on line 78

    Pretty sure the fault lies in runPHP plugin. Nothing I can do about it.

  35. Ales said,

    November 6, 2007 @ 2:53 pm

    Thanks for the sript

  36. doc said,

    November 8, 2007 @ 10:01 am

    “A user named “AboutSledge” offered a working solution, which was the Pagerank Checksum Caculator Source Code for Python, for C and for PHP.”

    site is down. anyone has the c code?

  37. siN said,

    November 13, 2007 @ 8:40 am

    i’d like to have C code too
    found some but can’t 100% sure it works

  38. Raja Amer Khan said,

    November 26, 2007 @ 5:11 pm

    Hello guys,

    This script is great and working. I need some help, i’m working on a project which has website resources. I created sorts for all types, and for page rank i used website url query inside pagerank function, it works fine but the problem is we cannot sort by page rank. So, is there any solution to store pagerank values inside mysql so it would be able to sort?

    help would be appreciated..

  39. hm2k said,

    November 30, 2007 @ 2:25 pm

    Try here:

  40. Raja Amer Khan said,

    November 30, 2007 @ 9:25 pm

    thank you for url but i’m a bit confused what to do with it. Newbie in mysql.. could you please guide me which one i download and how i save pr values into mysql?

    thank you!

  41. Thomas George said,

    December 7, 2007 @ 1:50 pm

    Hi Hm2k,

    Thanks for this script.

    It will help me to keep tack of PR of my sites.

  42. Chris said,

    December 12, 2007 @ 5:09 pm

    Thanks for the script! It works great on our server, but I do have one hang up. I’d like to configure the script to automatically display the pagerank of a site I hard code into it instead of inputting a site by hand in the text box. I’ve been experimenting with no luck, has anyone done this?

    Please let me know if you have any suggestions.

  43. Michael said,

    December 13, 2007 @ 7:14 am

    God dammit, you are my Hero !

    Since my Hoster has changed to Debian (gaijins) old script didnt work anymore.
    Took me 2 Days to find this here and WEEEEEEE …. works like a charm !

    Thanks alot *excited*

  44. Monarchy said,

    December 13, 2007 @ 6:45 pm

    Big thanks for this script!

  45. Raja Amer Khan said,

    December 13, 2007 @ 9:34 pm

    no reply?

    can’t i save page ranks in mysql?

  46. Michael said,

    December 14, 2007 @ 4:09 am

    @Raja Amer Khan:
    Usually you call the funktion pagerank( ), provide an url and receive the pagerank in $pr
    So, after receiving $pr Value, just store it into your database.

    Only thing you should consider is, that you should think about a function for updating those values, too
    in case, google does its dance and things will change.

  47. Raja Amer Khan said,

    December 16, 2007 @ 6:18 pm

    well i’m trying something like this:

    Website | Title

    i use pagerank(“$row['website']“)

    this works perfect but this cannot be sorted.

    I tried to add php command in mysql but it didnt work, could you please explain what your saying?

    thank yoU!!

  48. Michael said,

    December 16, 2007 @ 6:34 pm

    Set up field for pagerank in your database

    Then basically (this aint a code to copy paste… just a basic idea:

    while (mysql_query(“select bla from bla ….. “)) {
    if (!$row[`pagerank`]){ // check if PR is already set
    mysql_query (“alter table xxxxxxx ……. value”.pagerank($row[`website`]).”)”; // depends on your code-style how you call the function but i am sure you can fiddle it to work

    Use something like this to store pagerank for your sites.

    Then you should be able to call these site in Order of their Pageranks
    by useing order by

    Other Way would be, that you use php sort :

  49. Raja Amer Khan said,

    December 19, 2007 @ 7:50 pm

    Thank you so much for your suggestions.

    I will surely try that code. Could you please add my email in your msn or give me your email?

  50. Agus Halim said,

    December 27, 2007 @ 12:05 pm

    Hi, i’ve try this code at my hosting server (godaddy shared hosting)
    i try the url but the rank is still at N/A or 0 state

    i have already tried many google pagerank code for this weeks and still no luck :(

    last time i was assume maybe my server is running on linux 32 bits
    i’ve also try Get google page rank (32bit and 64 bit systems)
    but this method also fail. please help…
    thank you very much

  51. tyler dewitt said,

    January 12, 2008 @ 11:04 am

    The page rank script is giving me a 404 error they just did a google page rank update a few hours ago and ever since they did the update my script ain’t working I get a 404 back?

  52. Raja Amer Khan said,

    January 25, 2008 @ 6:09 pm

    hello Michael !

    i worked on your trick but unsucceeded.i also tried update command but fail. coz i dont know much abt mysql.

    what i want to do.

    i have table named : table
    i have rows in it
    ID : 0,1…
    Title: sites title
    Pr: 0

    What i want to do is to automatically update pr of the tables.

    I want to fetch site address from Site row like > pagerank($row['Site']) and then update the Pr value from that.

    How can i do that?

    plz reply soon…

  53. Michael said,

    January 29, 2008 @ 6:41 am

    Hi Raja,
    i have tried to add you to msn a while ago but to no avail, yet ?

    For your Problem (you might have to change this example code… but something like this should work?)
    First get the Data from your mysql

    $sqlgetentries = mysql_query(“select ID, SITE, Pr from table);

    while you have results, check the pagerank and update it if the previous saved Pr has changed:

    while ($row = mysql_fetch_array($sqlgetentries)){
    $getpagerank = pagerank($row[' Site']);
    if ($getpagerank $row['Pr'){
    mysql_query("UPDATE table SET Pr='".$getpagerank"' WHERE id='".$row["id"].”‘”)

  54. John said,

    February 4, 2008 @ 9:30 am

    Dude thank you a TON. Your script works perfectly, and even better than the original. I’m on some fairly new version of PHP5.

  55. Jon said,

    February 10, 2008 @ 3:24 pm

    After a week of bashing my head against a wall, I’ve finally found a working script!

  56. John Loch said,

    February 11, 2008 @ 11:41 am

    I appreciate your efforts.

    I noticed (with my script) the checksum was mangled on my production box, but under WAMP with PHP 5.x it was fine. I implemented your checksum routine and it solved the problem.

    You saved me a lot of hassle and time.

    If I stop by again because you’ve created something I need, I’ll look once more for a donate button ;)

    Cheers :)

  57. Vivek Thomas said,

    February 22, 2008 @ 3:26 pm

    Thank you very much for this. I had a script and it was not working fine on my server. Your scripts works perfectly.


  58. Monarchy said,

    March 1, 2008 @ 2:51 pm

    Thanks for this script!

    For right working with url with “&” symbols you need to add $url = str_replace(“&”, “%26″, $url); to the function getpr()

    function getpr($url)
    global $googlehost,$googleua;
    //$url = str_replace(“%26″, “&”, $url); если передается через параметр
    $ch = getch($url);
    $url = str_replace(“&”, “%26″, $url); // add this!!!
    $fp = fsockopen($googlehost, 80, $errno, $errstr, 30);

    Hello from Russia!
    The Tsar’s Russia will arisen!

  59. Brnden said,

    March 12, 2008 @ 11:05 pm

    Took me forever to find this, but it works like a charm. Thanks.

  60. TechPro said,

    March 18, 2008 @ 9:57 am

    Thank you very much!

  61. NakedSnail said,

    March 23, 2008 @ 5:45 am

    i use

    ok~~it`s work well;

  62. Razvan Girmacea said,

    April 1, 2008 @ 1:41 pm

    Really thanks for the script. Old one I was using from Google community was not working.

  63. John said,

    April 7, 2008 @ 9:29 pm

    I’m trying to do a similar thing to Raja Amer Khan, running the function on a series of sites in a MySQL table. I’ve already got the queries set up OK (similar to what Michael suggested), but when I try to run the getpr function (because I just want the integer, and not the bar display), inside the loop generated by my select query, I get the following error message:

    Warning: fsockopen() [function.fsockopen]: unable to connect to :80

    If I run the script by itself with a URL in the querystring, it works OK.

    Any idea what I’d need to do to get it working with my query?

    (Which looks like this if that helps:

    $result = mysql_query(“SELECT `site_url`, `site_id` FROM `sites` ORDER BY `site_id`”);

    while ($value = mysql_fetch_array($result)) {
    $rank = getpr($value['site_url']);
    $id = $value['site_id'];
    $result2 = mysql_query(“UPDATE `sites` SET `site_google` = ” .$rank. ” WHERE `site_id` = ” .$id);

  64. Michael said,

    April 9, 2008 @ 7:07 am

    I can just imagine, that somehow the script did not get the $googlehost, since the errormessage just tells about Port 80 with nothing before it ?
    Not sure but I`d check where and how the $googlehost is set and if the Funkction does actually knows it …. ?

  65. The Ultimate Web Design Gallery Resource — Tyssen Design said,

    May 15, 2008 @ 5:46 am

    [...] Credit must go to Frequency Decoder for the Unobtrusive Table Sort Script, Peter Krantz and Eric Meyer for their work on creating accessible HTML/CSS bar charts, Matt Huggins for the Alexa traffic script, Eston Bond for the Feedburner subscribers script, and HM2K for the Google Pagerank script. [...]

  66. forum said,

    May 24, 2008 @ 7:03 am

    very nice thanks !

  67. Achmad Zaenuri said,

    May 31, 2008 @ 7:31 am

    You’re freakin genius!

    Thank you and keep the good work!

  68. Angra-Mainyu said,

    June 9, 2008 @ 11:59 am

    I try your script on my server who is hosted by OVH, but it don”t work.
    On a local server, i get the good page rank.
    You can see the result at
    Thanks for your answer.

  69. Kicko said,

    June 18, 2008 @ 11:14 am

    Thank you!!! It’s working on my servers …

  70. Pygmalion » Blog Archive » Google PageRank in PHP said,

    June 23, 2008 @ 12:53 pm

    [...] have to calculate the PageRank Checksum and send it with your request. This is the way to go: We have added a simple demo. Get your PageRank right [...]

  71. Tum said,

    July 19, 2008 @ 3:35 am

    Thank a lot!!!

  72. Twitter Tweets about PageRank as of July 23, 2008 : The Lessnau Lounge said,

    July 23, 2008 @ 5:59 pm

    [...] 2008-07-23 01:24:40 · Reply · View slaptijack: @douglaskarr I got information from and 2008-07-23 00:27:07 · Reply · View codeguy: SEO [...]

  73. Google pagerank checker php script free download - l Webmaster Forum - Web Advertising - Web Design - SEO Forums said,

    August 12, 2008 @ 9:14 am

    [...] pagerank checker php script free download Source from: Edit version and demo : Download: [...]

  74. Paolo said,

    September 25, 2008 @ 9:21 pm

    it seems a good script, I’m looking for one that allow webmasters to grab a html code and paste on their webpages to show pagerank
    it would be a fantastic source of (almost) free links

    check seo stats tool to make u an idea of what I’m talking about

    is this script useful for me?

  75. Joe said,

    October 5, 2008 @ 5:39 pm

    Not too bad. I hacked up a utility that will get the PR for thousands of domains in one quick easy pass…

  76. talle said,

    October 5, 2008 @ 10:07 pm

    This scrip support SOCKs proxies?


  77. hrumos said,

    October 8, 2008 @ 7:19 pm

    Man, thanks !
    Its what i searched for.

    You are great one.

  78. Migs de Villa said,

    November 14, 2008 @ 7:07 am


    was a few days looking for a real one.

    keep it up!

  79. Scott said,

    December 10, 2008 @ 2:59 pm

    Any ideas how to get around this problem?

    We’re sorry…

    … but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can’t process your request right now.

    We’ll restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected, you might want to run a virus checker or spyware remover to make sure that your systems are free of viruses and other spurious software.

    We apologize for the inconvenience, and hope we’ll see you again on Google.

  80. Michael said,

    December 12, 2008 @ 6:38 am

    You can generate this type of error by making searches as fast as possible (5-10/sec). At one point google will think you’re a bot, hence the “your query looks similar to automated requests from a computer virus or spyware application”.

    So you might want to reduce the speed and/or the amount of request to google.

    I have now made it so, that i request a Pagerank for a site when i add it, put the PR-Value into a mysql-Database and also save the Date of the request.
    While displaying the pagerank i check the date and if it is x days old (lets say 30 or maybe 90 days) i let it update and save the (maybe) new pagerank and new date.
    Otherwise i just display the pagerank it has already got.

    For me this has 4 good sides:
    1: I wont mass-request google
    2: the display of many pageranks per Site is much faster
    3: more accurate when googles server isnt responding
    4: I can check, what pageranks i have grouped by its value (e.g. 3523 x PR 3)

    Updates will mostly done by visitors of my sites, so it keeps itself updated for frequently visited entries.
    The bad side might be, that when google does updates while the date isnt too old, it will show the old, outdated pagerank…. and of course a higher amount of Database-request (might wanna add some caching some day … but its running fine right now, so why not beeing lazy? *grin*)

  81. Michael said,

    December 12, 2008 @ 6:43 am


    I also check how many entries i have and check against how many pageranks i have saved.
    So i can be pretty sure, if all sites are checked.

    Since i actually have 13089 (and counting ^^) entries i cant really check and keep them updated manually.

  82. Adam said,

    March 29, 2009 @ 8:01 pm

    Thanks HM2k, I found a few PHP pagerank scripts on the web but yours seems the best.

  83. Mateusz Mucha said,

    April 16, 2009 @ 8:49 pm

    is there any way to tell whether PR is 0 or there was some error? I’m writing results to the DB and would really like to know…

  84. Pance said,

    April 17, 2009 @ 7:59 am

    Thanx a lot pal, it works like a charm :)

  85. Michael said,

    April 18, 2009 @ 6:31 am

    @ Mateusz Mucha:

    Check out Function getpr and have a look a:
    if($pos === false){//you could add something maybe to $pr here ^^ }

  86. mushtaq said,

    August 6, 2009 @ 9:32 pm

    thanks Pal
    Keep up the good work.

  87. dvd said,

    October 15, 2009 @ 4:24 pm

    403 – Forbidden error. but
    is ok

  88. yamazon said,

    November 24, 2009 @ 4:49 am

    I’m Japanese.
    I had been looking for this script for a long term.
    It is very glad to me.

    the script moved when changing as follows.

    hammer said,
    You need to make a change at the bottom of the page in the last 2 lines
    take away the // symbols in front of the line that has them at the beginning, save it, then retest it

    Thank you for everybody.

  89. ashish sharma said,

    December 13, 2009 @ 1:45 pm

    hi ,
    I use this script in my website and upload it on my server, it work well when i used it on the local server , but when i uplaod it to the main server it show the blank page …………….
    plz help me out from this problem , suggest me what to do………….

  90. SEO chambee said,

    December 19, 2009 @ 10:22 am


    it is very nice script for me.

    thank you very much.

  91. Top 10 host said,

    January 2, 2010 @ 9:26 am


    was a few days looking for a real one.

    keep it up!

  92. hm2k said,

    January 7, 2010 @ 1:40 pm

    To showcase my script I created this:

    Hope you find this useful.

  93. Genta said,

    January 13, 2010 @ 5:16 pm

    Great!!! Works!!!
    Actually I tested it in local. As soon as possible I will put it on my online web server. I hope that the script will work online too. A lot of web servers are incompatible with this kind of scripts. I come back to write if works when I finish.
    Sorry for my poor English…

  94. Arun M said,

    February 3, 2010 @ 2:43 pm

    Great Work, Thank you very much for sharing.

  95. Dave said,

    February 15, 2010 @ 5:27 pm

    Am I missing something? Where do I download the code for this?

  96. Dave said,

    February 16, 2010 @ 12:16 pm

    I’ve just tried the script and it gives me a 403 Forbidden error. Isn’t this script supposed to “fix” the 403 error?

  97. hm2k said,

    February 16, 2010 @ 12:25 pm


    Download the latest here:

    See it in action here: (It does work)

    If it’s not working, it may be a problem with how your server calculates the checksum, you may need to upgrade PHP.

  98. Dave said,

    February 16, 2010 @ 1:26 pm


    I’m using PHP version 4.4.9

    Can you tell me if this should be sufficient or what version I would need?


  99. hm2k said,

    February 16, 2010 @ 1:32 pm


    PHP5 ->

    PHP4 was first released 10 years ago, it’s time to move on.

  100. Dave said,

    February 16, 2010 @ 1:45 pm

    Cheers – have just switched server to 5 (my provider sets 4 as default for some reason). Script now working perfectly.

    Many thanks for the script and your help.

  101. iker said,

    March 5, 2010 @ 7:58 am


    I have ported this code to python:

  102. David Vincent said,

    March 23, 2010 @ 3:54 pm

    Hi, I have 7 servers at HostGator, but the script dos not work on any of them !!!!
    Just return a blank page… :(
    If anyone have a solution… Thx

  103. Rednex said,

    April 4, 2010 @ 12:51 pm

    I wanted the pagerank to be shown as a number, so i modified last two lines like simly like this: echo pagerank($url);

  104. gosc said,

    April 22, 2010 @ 1:09 pm

    I have errors:
    A PHP Error was encountered

    Severity: Warning

    Message: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known

    Severity: Warning

    Message: fsockopen() [function.fsockopen]: unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known)

    I have save_mode = off… Can anyone help ?

  105. pagerank said,

    June 20, 2010 @ 4:19 pm

    very nice script.

RSS feed for comments on this post · TrackBack URL

Leave a Comment