Jump to content
Dragos

[PHP] Verifica pagerank

Recommended Posts

  • Moderators
Posted
<?php
function gpagerank($q,$host=’toolbarqueries.google.com’,$context=NULL)
{
$seed = “Mining PageRank is AGAINST GOOGLE’S TERMS OF SERVICE. Yes, I’m talking to you, scammer.”;
$result = 0×01020345;
$q = trim($q);
$len = strlen($q);
for ($i=0; $i<$len; $i++)
{
$result ^= ord($seed{$i%strlen($seed)}) ^ ord($q{$i});
$result = (($result >> 23) & 0x1ff) | $result << 9;
}
$ch=sprintf('8%x', $result);
$url='http://%s/tbr?client=navclient-auto&ch=%s&features=Rank&q=info:%s';
$url=sprintf($url,$host,$ch,$q);
@$pr=file_get_contents($url,false,$context);
return $pr?substr(strrchr($pr, ':'), 1):false;
}
?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...