PDA

View Full Version : Pagerank script



Masetek
11-26-2005, 04:55 PM
I have been try to get this script working:

http://www.googlecommunity.com/scripts/google-pagerank.php

I am literally cutting and pasting the code and uploading the script but keep getting this error:

Warning: file(http://www.google.com/search?client=navclient-auto&ch=61695485074&features=Rank&q=info:site.com): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/critic/public_html/pagerank.php on line 219
site.com PageRank:

I have been talking with ppl @ DP and this exact scipt is being used on their servers no worries. I even tried using their modified versions of it and still same error. I thought maybe it's my server, so I signed up with some free php hosting server and still the same error.

Does know why the wtf I am getting a 403 returned from google and no one else is? Or does anyone have an alternate script I can use for this.

Thanks :)

James
11-26-2005, 06:34 PM
You sure you have the permissions set correctly on this file and the files that are included/required/etc. into it?

Masetek
11-26-2005, 07:58 PM
Yeah. It's just one file. I reckon there is something wrong with the url it's generating. Checksum maybe wrong..

moonshield
11-26-2005, 10:30 PM
hmm. You may need a Google API Identification. Do you have that? The 403 may be occuring when you are trying to access Google's API.

freekrai
11-28-2005, 07:53 AM
I've had no problem getting that script to work.
The problem seems to be from the GoogleCH function.
This function creates a key that google uses.
Do you have the right code for the GOOGLE_MAGIC variable?
Should be:
define('GOOGLE_MAGIC', 0xE6359A60);

Masetek
11-28-2005, 04:40 PM
I've had no problem getting that script to work.
The problem seems to be from the GoogleCH function.
This function creates a key that google uses.
Do you have the right code for the GOOGLE_MAGIC variable?
Should be:
define('GOOGLE_MAGIC', 0xE6359A60);

Yep, I thought it may have been that too so I checked and it's ok. The srcipt is an exact copy from what others are using and it just doesn't work on my server. Maybe it could be a server config issue? I dunno, Im lost with this one...

Masetek
12-01-2005, 06:58 AM
FYI I was taking to some other ppl about this...and all we came up with was google might have banned requests coming from my ip range. Apparently google frowns apon people using these tools to query google without using the api.

freekrai
12-01-2005, 07:27 AM
Have you tested it on another machine in your IP range?
The reason I mentioned the google_magic key and all that earlier is because if the scripts screws up the key generation it does for the site you want to check, then it will return a 403 error.