Hi, I didn`t find anuthing in search... I need to write script (PHP) what will getting PR... How I can do it?
This might be worth a look I found after a search on G : http://www.scripts.com/php-scripts/web-fetching-scripts/google-pageranktm-xmlrpc-service
Maybe this can help you: function getPR($_url) { $adress = 'info:'.$_url; $ch = GCH(strord($adress)); $adress='info:'.urlencode($_url); $pr = file("http://www.google.com/search?client=navclient-auto&ch=6$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$adress"); $pr_str = implode("", $pr); return substr($pr_str,strrpos($pr_str, ":")+1); } Code (markup):
the script is complex because it needs to compute a hash before querying google - the one I see here sounds too simple to work !
i am using davilac's code however I am not sure what need in my html here is my code: how do i link the php and the html? <?php function getPR($_url) { $adress = 'info:'.$_url; $ch = GCH(strord($adress)); $adress='info:'.urlencode($_url); $pr = file("http://www.google.com/search?client=navclient-auto&ch=6$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$adress"); $pr_str = implode("", $pr); return substr($pr_str,strrpos($pr_str, ":")+1); } ?> <html> <title>Google Page Rank Checker</title> <body> <form method="get"> <table border="0"> <tr> <td> Site URL: (example: www.google.com) </td> <td> <input name="url" type="text" value="<?=$address;?>"> </td> <td> <input type="submit" value="Get PR"> </td> </tr> </table> </form> <?=$pr_str;?> </body> </html> Code (markup):