rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CryStats.com search</title>
<style type="text/css">
<!--
.name { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; color: #999999; font-weight: bold; display: inline; }
td,th { color: #FFFFFF; }
body { color: #FFFFFF; background-color: #000000; }
.main { font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #CCCCCC; }
.main2 { font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #CCCCCC; text-align:right; }
.main3 { padding-left: 2px; }
.input { background-color:#000000; border: solid 1px #666666; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; }
.bottom { font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #666666; }
a:link { color: #666666; text-decoration: none; }
a:visited { text-decoration: none; color: #666666; }
a:hover { text-decoration: none; color: #666666; }
a:active { text-decoration: none; color: #666666; }
-->
</style>
</head>
<body>
<?php
/**
* @author boebi
*/
$id = $_GET['id'];
if ($id) {
$content = file_get_contents("http://query.crystats.com/leaderboard.php?player_list[]=$id");
$split = explode("\"",$content);
$rank = $split[4];
$score = $split[8];
$kills = $split[12];
$deaths = $split[14];
$kd = $kills ;
if (!$rank){
$rank = "No information";
}
if (!$score){
$score = "No information";
}
if (!$kills){
$kills = "No information";
}
if (!$deaths){
$deaths = "No information";
}
if (!$kd){
$kd = "No information";
}
?>
<table width="394" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="18" colspan="2" align="center" valign="middle"><div class="name">
<? echo $id; ?></div></td>
</tr>
<tr>
<td width="138" height="78" valign="top" class="main2"><b>
Rank<br />
Score<br />
Kills<br />
Deaths<br />
K/D ratio<br />
<td width="256" valign="top" class="main"><div class="main3">
<? echo $rank; ?><br />
<? echo $score; ?><br />
<? echo $kills; ?><br />
<? echo $deaths; ?><br />
<? echo $kd; ?></div></td>
</tr>
<tr>
<td height="26" colspan="2" valign="top"><div align="center" class="main">
Just enter the online username of the player you want to get stats from.</div></td>
</tr>
<tr>
<td height="13" colspan="2" align="center" valign="top" class="bottom">script <a href="http://cryforums.com"> boebi</a>, special thanks to <a href="http://crystats.com">1ApRiL</a></td>
</tr>
</table>
<?
}
else {
?>
<form enctype="multipart/form-data" action="index.php" method="get">
<table width="394" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="394" height="23" valign="middle" align="center"><div class="name">NAME:</div>
<input class="input" name="id" type="text" /> <input class="input" value="Search" type="submit" /></td>
</tr>
<tr>
<td valign="top"><div align="center" class="main">
Just enter the online username of the player you want to get stats from.</div></td>
</tr>
<tr>
<td height="13" colspan="2" align="center" valign="top" class="bottom">script <a href="http://cryforums.com"> boebi</a>, special thanks to <a href="http://crystats.com">1ApRiL</a></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>