GooglePageRank? not work perfectly.
In many host usually, disable URL open access.in other word below code not work :
$rdata = @file($file);
I use pear for open url, see below code :
function open_url($URL)
{
require_once 'HTTP/Request.php';
$httpRequest = new HTTP_Request();
$httpRequest->setMethod(HTTP_REQUEST_METHOD_GET);
$httpRequest->setURL($URL);
$resRequest = $httpRequest->sendRequest();
if (PEAR::isError($resRequest) || (int) $httpRequest->getResponseCode() <> 200) {
return false;
}
return ($httpRequest->getResponseBody());
}
Also I replace your code :
if (!empty($rdata)) {
$rankarray = explode(':', $rdata[0]);
$rank = end($rankarray);
}
with :
$pos = strpos($rdata, "Rank_");
if($pos === false){
}else{
$rank = substr($rdata, $pos + 9);
}
}}}[[BR]]
Now GooglePageRank is usable ;)