Code: Select all
require_once("google_pagerank.class.php");
$rankObject = new GooglePageRank("http://www.yourdomain.com/");
$pageRank = $rankObject->pagerank;
echo $pageRank;
The ‘GooglePageRank’ class accepts cache time as a second parameter. So if you want to cache the result for 6 hours you set the second parameter for 21600 seconds (6 * 60 * 60):
Code: Select all
$rankObject = new GooglePageRank("http://www.yourdomain.com/", 21600);