Google RageRank Script
Update: See this script in action at pagerankviewer.com
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 googlecommunity.com 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, googlecommunity.com 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.
- Download PHP PageRank Lookup script.
105 Comments »
RSS feed for comments on this post · TrackBack URL
Diego said,
February 22, 2007 @ 12:00 am
You are a genius!!!
It finally worked on my weird server!! Thanks man!
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?
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.
Mark said,
March 18, 2007 @ 1:26 pm
Thanks a lot! It’s work.
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();
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
hammer
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: http://www.youserver.com/www.example.com where the http://www.yourserver.com is your host server for the script…and the http://www.example.com is the page you requested for pagerank test. So the link will be http://www.yourserver.com/www.example.com if you click that bar.How can we change that into http://www.yourserver.com 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
upper said,
April 12, 2007 @ 1:06 pm
we modified that script a little bit and here is a new version of it : http://www.rodp.net/hosted/
I don’t know if this will be the final version of it,but further updates will be available on our test site
hm2k said,
April 12, 2007 @ 3:30 pm
If you insist on using my code, please at least give me credit.
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.
Max said,
April 26, 2007 @ 11:41 pm
Hi, i tested the scripts with your code for this URL and did not work:
http://www.digitalwall.com/scripts/search.asp?txtKeyword=%BA%F4%B8%F4%A6%E6%BEP
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 pagerank.gamesaga.net. Guess the algorithm cannot compute the correct PR value for this URL.
helmut said,
April 29, 2007 @ 10:43 pm
ingenious it’s really helpful.
Thank you
Aukcje said,
April 30, 2007 @ 7:10 pm
Thanks a lot! It’s work.
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…
kost said,
May 4, 2007 @ 9:04 am
Good script. Thank you.
seoguy said,
May 6, 2007 @ 10:24 am
Thanks buddy… After a long research I found this page… before that I tried googlecommunity.com script ,http://www.devpapers.com/article/326 .. none of these are working .. All are giving the same old 403 error…
Thanks again.. Is it ok to use http://www.google.com/images/pos.gif image diractly from google??…
www.fu20.com said,
May 25, 2007 @ 9:02 am
i like php code for show page rank
please help me
have fun
Fariz Tadjoedin said,
June 8, 2007 @ 7:05 am
Yes, it’s work, i love you
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 !
http://directory.ipgp.net/
Faraz said,
June 15, 2007 @ 11:48 pm
Hi, I just uploaded the file on my server http://www.dezigno.com.au. it is not working. please have a look http://www.dezigno.com.au/pagerank.php. another thing, please tell me which ares in php to customized? i have knowledge in html and css, not much with php. cheers faraz
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!
Tobi said,
July 12, 2007 @ 8:02 pm
Thank you!!!
gafeman said,
July 13, 2007 @ 10:56 am
¡¡ you made a really good job !!
i include it in my service, check it out: http://www.viciao2k3.net/services/xinu?lang=uk
Grettings from Spain
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
Sir said,
July 31, 2007 @ 9:28 pm
It works!!! Big thanks!
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?
Des-X said,
August 22, 2007 @ 10:06 pm
THX. It works on 64bit Linux and Mac
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
ju
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″;
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!
Thanks!
figaro said,
September 25, 2007 @ 7:39 pm
Thank you for sharing. God bless and Godspeed.
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)
Julian said,
October 10, 2007 @ 9:36 pm
Thanks!
Looked around for this Google Pagerank script for quite a while.
Finally found someone who did a good work.
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!
MyDeskBlog.com 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 http://www.nosq.com/blog/runphp/ 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.
Ales said,
November 6, 2007 @ 2:53 pm
Thanks for the sript
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?
siN said,
November 13, 2007 @ 8:40 am
i’d like to have C code too
found some http://www.upsdn.net/html/2005-09/553.html but can’t 100% sure it works
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..
hm2k said,
November 30, 2007 @ 2:25 pm
Try here:
http://web.archive.org/web/20070718095023/http://pagerank.gamesaga.net/
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!
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.
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.
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*
Monarchy said,
December 13, 2007 @ 6:45 pm
Big thanks for this script!
Raja Amer Khan said,
December 13, 2007 @ 9:34 pm
no reply?
can’t i save page ranks in mysql?
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.
Raja Amer Khan said,
December 16, 2007 @ 6:18 pm
well i’m trying something like this:
MYSQL:
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!!
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 : http://de3.php.net/manual/en/function.sort.php
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?
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 google.com but the rank is still at N/A or 0 state
http://www.online-program.net/tools/pr/pagerank.php?url=www.google.com
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)
http://www.webmasterworld.com/php/3318556.htm
but this method also fail. please help…
thank you very much
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?
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
Site: http://www.site.com, http://www.me.com….
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…
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"].”‘”)
}
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.
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!
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
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.
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); если передается через параметр http://pravoslavie.name/pr/pagerank.php?url=http://monar.ru/index.php?article=sitemap%26page=5
$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!
Brnden said,
March 12, 2008 @ 11:05 pm
Took me forever to find this, but it works like a charm. Thanks.
TechPro said,
March 18, 2008 @ 9:57 am
Thank you very much!
NakedSnail said,
March 23, 2008 @ 5:45 am
Thanks,man.
i use
$googlehost=’toolbarqueries.l.google.com’;
ok~~it`s work well;
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.
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);
}
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 …. ?
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. [...]
forum said,
May 24, 2008 @ 7:03 am
very nice thanks !
Achmad Zaenuri said,
May 31, 2008 @ 7:31 am
You’re freakin genius!
Thank you and keep the good work!
Angra-Mainyu said,
June 9, 2008 @ 11:59 am
Hello,
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
http://www.webmestre-annuaire.com/pagerank/mypagerank.php
Thanks for your answer.
Kicko said,
June 18, 2008 @ 11:14 am
Thank you!!! It’s working on my servers …
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: http://hm2k.com/projects/pagerank We have added a simple demo. Get your PageRank right [...]
Tum said,
July 19, 2008 @ 3:35 am
Thank a lot!!!
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 http://hm2k.com/projects/pagerank/ and http://pagerank.gamesaga.net/ 2008-07-23 00:27:07 · Reply · View codeguy: SEO [...]
Google pagerank checker php script free download - DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums said,
August 12, 2008 @ 9:14 am
[...] pagerank checker php script free download Source from: http://hm2k.com/projects/pagerank Edit version and demo : http://www.highrankforum.com/pagerank.php Download: [...]
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 stats21.com seo stats tool to make u an idea of what I’m talking about
is this script useful for me?
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…
talle said,
October 5, 2008 @ 10:07 pm
This scrip support SOCKs proxies?
Regards.
hrumos said,
October 8, 2008 @ 7:19 pm
Man, thanks !
Its what i searched for.
You are great one.
Migs de Villa said,
November 14, 2008 @ 7:07 am
awesome!
was a few days looking for a real one.
keep it up!
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.
Michael said,
December 12, 2008 @ 6:38 am
@Scott:
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*)
Michael said,
December 12, 2008 @ 6:43 am
Addtition:
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.
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.
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…
Pance said,
April 17, 2009 @ 7:59 am
Thanx a lot pal, it works like a charm
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 ^^ }
mushtaq said,
August 6, 2009 @ 9:32 pm
thanks Pal
Keep up the good work.
dvd said,
October 15, 2009 @ 4:24 pm
403 – Forbidden error. but http://toolbarqueries.google.co.jp/search?features=Rank:&sourceid=navclient-ff&client=navclient-auto-ff&iqrn=jnOB&ch=8b88ac769&q=info:http%3A%2F%2Fwww.google.com%2F
is ok
yamazon said,
November 24, 2009 @ 4:49 am
hello.
I’m Japanese.
I had been looking for this script for a long term.
It is very glad to me.
thanks!!!
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.
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………….
SEO chambee said,
December 19, 2009 @ 10:22 am
hi.
it is very nice script for me.
thank you very much.
Top 10 host said,
January 2, 2010 @ 9:26 am
awesome!
was a few days looking for a real one.
keep it up!
hm2k said,
January 7, 2010 @ 1:40 pm
To showcase my script I created this:
http://www.pagerankviewer.com/
Hope you find this useful.
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…
Arun M said,
February 3, 2010 @ 2:43 pm
Great Work, Thank you very much for sharing.
Dave said,
February 15, 2010 @ 5:27 pm
Am I missing something? Where do I download the code for this?
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?
hm2k said,
February 16, 2010 @ 12:25 pm
@Dave
Download the latest here: http://hm2k.googlecode.com/svn/trunk/code/php/scripts/pagerank.php
See it in action here: http://www.pagerankviewer.com/ (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.
Dave said,
February 16, 2010 @ 1:26 pm
Thanks…
I’m using PHP version 4.4.9
Can you tell me if this should be sufficient or what version I would need?
Thanks
hm2k said,
February 16, 2010 @ 1:32 pm
@dave
PHP5 -> http://www.gophp5.org/
PHP4 was first released 10 years ago, it’s time to move on.
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.
iker said,
March 5, 2010 @ 7:58 am
Hi,
I have ported this code to python:
http://www.ikeralbeniz.net/2010/03/05/contulta-tu-pagerank-de-google-con-python/
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
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);
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 ?
pagerank said,
June 20, 2010 @ 4:19 pm
thanks.
very nice script.