Click here to view this site's accessibility statement.

I feel as though I cracked a big riddle, but in retrospect I should've seen it coming.
The problem with the aforementioned PageRank not working on some hosts was not about cURL, not about errors in the script (though I fixed a few). It was about Google, and the host you're using.
See, Google wants to make sure that its PageRank works nicely with the Toolbar they have. A few years ago an intrepid coder by the name of broke apart the toolbar and found the key to the algorithm- a 10 digit value called a checksum, and when that too was changed, cracked it again. The checksum is unique to each domain query (on the surface level I noted that it starts with '6-' for a domain without the protocol identifier 'http://', while it is another different value with it).
http://www.google.com/search?client=navclient-auto
&features=Rank:&q=info:www.rioleo.org&ch=6-2130221911
(Try visiting the page - the last number on that page is the PageRank.)
In short, what we're trying to do is emulate the toolbar, because Google offers no API and no assistance whatsoever in getting at the value at any other way.
But, Google being the sneaky people they are, will flat out run 403 Forbidden errors to what it considers to be automated, robot-based requests. The checksum is valid, the URL is valid, but Google's servers stops the request. Hence the issue is trying to conceal the actual request. Follow the following steps:
1) Don't use GoDaddy. I noticed that my PageRank script was working well at 14:03 and 16:09 (I didn't check the other hours), which means Google resets all invalid requests and says "Okay, we'll process your request" but since I'm on a shared hosting program with several hundred if not thousand others, it gets queried from the same IP address pretty often. At some point, it just shuts down.
2) Instead, use something like FreeHostia, where you can host your script for free without banner ads. You can see my pagerank script at work .
Bliss!
With that, I present to you, .
This entry was posted on Wednesday, January 2nd, 2008 at 6:40 pm, EST under the category of Web design. You can leave a response, or trackback from your own site.