I need a php based google page rank tool, ultimately like most page rank tools, a person puts a code on their site
<a href="http://www.oursite.com/" target="_blank"><img src="http://www.oursite.com/pagerank.php"></a>
Based on the referring URL, the associated page rank is displayed. (We will supplie images, just add fillers for now) The goal here is to make the placement easy with no configuration, so it's important that the request be based on the referring url.
In an effort to minimize request to google, every request should be saved to a mysql database and only requested to google directly if there is a record older than 7 days.
So for example, when the first request is made, the script searches the db, if a record exist, it displays that page rank image. If it doesn't exist, it makes the request to google and updates the database.
I know there are tons of these scripts out there so this is be very easy, but we want our own :)