Piwik is a Open source web analytics application that has a huge number of valuable functions related to SEO and other analytics stuff built-in. One such module is RankChecker. This module provides page rank information for Google, Dmoz and Alexa. With some modification to the original RankChecker.php we can use it in our own application (with appropriate license). The following is a example code for the same using RankChecker.
<?php require_once('RankChecker.php'); $rank = new SEO_RankChecker('www.wired.com'); echo "Google PageRank : " . $rank->getPageRank() . PHP_EOL; echo "Alexa PageRank : " . $rank->getAlexaRank() . PHP_EOL; echo "Dmoz Entries: " . $rank->getDmoz() . PHP_EOL; echo "Google Indexed Pages : " . $rank->getIndexedPagesGoogle() . PHP_EOL; echo "Bing Indexed Pages : " . $rank->getIndexedPagesBing() . PHP_EOL; ?> |
This will return the following.
Google PageRank : 8 Alexa PageRank : 806 Dmoz Entries: 480 Google Indexed Pages : 367000 Bing Indexed Pages : 427000 |
The code files can be downloaded from below.
Nice information! Thanks for sharing the code with us…. keep providing such good examples.