/**********************************************************************
GooglePR -- Calculates the Google PageRank of a specified URL
Authors : Emre Odabas (emre [at] golge [dot] net)
Version : 2.0
Description
What is Google PageRank?
PageRank is a family of algorithms for assigning numerical weightings
to hyperlinked documents (or web pages) indexed by a search engine.
Its properties are much discussed by search engine optimization (SEO)
experts. The PageRank system is used by the popular search engine
Google to help determine a page's relevance or importance.
As Google puts it:
> PageRank relies on the uniquely democratic nature of the web by
> using its vast link structure as an indicator of an individual
> page's value. Google interprets a link from page A to page B as
> a vote, by page A, for page B. But Google looks at more than the
> sheer volume of votes, or links a page receives; it also analyzes
> the page that casts the vote. Votes cast by pages that are
> themselves "important" weigh more heavily and help to make other
> pages "important."
For more info:
http://www.google.com/corporate/tech.html
http://en.wikipedia.org/wiki/PageRank
http://www.google.com/webmasters/4.html
This class will calculate and return the Google PageRank of the
specified input URL as integer. Class was build based on Raistlin
Majere's google_pagerank function
Change Log:
2008-01-24 * Hash calculation functions updated because of
miscalculation based on php versions.
(algorithm updated based on a anonymous source
code which supposed to be found at
http://pagerank.gamesaga.net but not exists
any more.)
2005-12-07 * Small bug removed (dies when caching disabled)
2005-11-24 * Added user-agent support
* Class selects random google hostnames in
order to prevent abuse. (You may define extra
google hostnames)
* Class now first tries cURL, fsockopen() and
file_get_contents() to connect google servers.
* Added caching option to class. Results now can be
cached to flat files in order to prevent abuse and
increase performance.
* Cache files are stored in seperate directories for
performance issues.
2005-11-04 * Initial version released
Ex:
$gpr = new GooglePR();
//$gpr->debug=true; //Uncomment this line to debug query process
echo $gpr->GetPR("http://www.progen.com.tr");
//Uncomment following line to view debug results
//echo "<pre>";print_r($gpr->debugResult);echo "</pre>";
**********************************************************************/
|