Get Google PageRank
I am working on a script to calculate the worth of a website. One of the variables in the script needs to be the Google PageRank of the website. I am having trouble getting the Google PageRank from my code. I think Google has blocked the server I am on because it won't give the PageRank, and it worked on another server. The error I get is
Warning: file_get_contents([url]http://www.google.com/search?client=navclient-auto&ch=61054125718&features=Rank&q=info:):[/url] failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/tidget/public_html/tidgulated.php on line 83
Here is the code I am using
<?php
$file = \"http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url\";
$data = file_get_contents($file);
?>
Any ideas?
teammatt3 posted this at 03:41 — 25th July 2006.
He has: 2,102 posts
Joined: Sep 2003
Well, I checked around and found out I have to remotely host it on another server that isn't forbidden. Blah...
webdude12 posted this at 06:56 — 3rd August 2006.
They have: 3 posts
Joined: Aug 2006
The other way to do is, is to use the curl function of php, it will bypass the google check 99% of the time.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.