Rating Services

Learn how to use Rating Services!


Variables:
- GET(REQUIRED): ladder -> AoCDM, AoCRM, AoCCS, AoKDM, AoKRM, AoKCS, RoRRM, AoERM
- GET: limit -> 1-50 [Do not select more than 50]
- GET: sort -> lastestmatch, rating, wins, streak
- GET: sorttype -> desc, asc
- GET: getclan -> 1 or 0 or empty
- GET: player -> player-name (for sigs; you may also use multiple names: eXecute,m0d,Impeached [Do not select more than 8])

Examples
http://www.igzones.com/ratingservices?ladder=AoCDM&getclan=1&sorttype=desc&sort=wins&limit=5
http://www.igzones.com/ratingservices?ladder=AoCDM&sorttype=desc&sort=wins&limit=5
http://www.igzones.com/ratingservices?ladder=AoCDM&sorttype=desc&limit=5
http://www.igzones.com/ratingservices?ladder=AoCDM&limit=5
http://www.igzones.com/ratingservices?ladder=AoCDM
Also for signatures and single players (only one returning row; ladder & player is required):
http://www.igzones.com/ratingservices?ladder=AoCDM&player=eXecute

PHP Code Example
Tell us if you experience problems with this code, make sure fopen has permission to open remote URLs, if not use fsockopen.
<?php
$igz_site = 
 fopen("http://www.igzones.com/ratingservices?ladder=AoCDM&getclan=1&sorttype=desc&sort=wins&limit=5",
 "r");
$ratingservices_page = fread($igz_site, filesize($igz_site));
fclose($igz_site);
$igz = explode(";", $ratingservices_page);
foreach($igz as $player){
	$variables = explode(",", $player);
	$clanname = $variables[0]; // only if you used getclan=1
	$clantag = $variables[1]; // only if you used getclan=1
	$playername = $variables[2];
	$rating = $variables[3];
	$wins = $variables[4];
	$losses = $variables[5];
	$incompletes = $variables[6];
	$streak = $variables[7];
	echo $clanname." [$clantag] ".$playername." ($rating) ".$wins." - ".$losses." - "
	.$incompletes." - ".$streak."<br/>";
}
echo '<a href="http://www.igzones.com"><img src="http://www.igzones.com/images/microbanner.png" 
border="0" alt="Age of Empires IGZones"></a><br/>';
echo '<a href="http://www.igzones.com" title="New IGZones is the new zone for Age of Empires">
Age of Empires IGZones</a>';
?>