<?php
// This class is intended to be used by those who have published classes on
// the phpclasses.org website.
// This is an example of how to use the AClassRating class.
// AClassRating is used to retrieve and display an author's rank and the
// ratings of each of his/her published classes on PHPClasses.org. Given
// the author's number, it will extract the following information from the
// PHPClasses website.
// For the author it will display:
// Number of classes
// All time rank
// Week Rank
// For each published class it will display:
// Name of class
// All time users
// All time rank
// Week users
// Week rank
//
// Be patient. It takes a few seconds for the information to be displayed.
// Remember, it has to load and extract the information from each class page
// plus the author's page.
//
// Change the value of $authnum to your author number. This number is mine.
$authnum=146036;
include "class.aclassrating.php";
$cr=new aclassrating();
$cnums=$cr->getClassNums($authnum);
if(count($cnums)>0){
$cr->startit("George Clarke");
for($i=3;$i<count($cnums);$i++){
$cr->getClasspg($cnums[$i]);
$cr->getRating();
$cr->showRating($i%2);
}
$cr->endit();
}else{
print "There are no classes for this author number.";
}
?>