Location: PHPKode > scripts > Call of Duty 4 Server Status > call-of-duty-4-server-status/index.php
<?
	include('COD4ServerStatus.php');
	
	$status = new COD4ServerStatus('127.0.0.1', '28960');	
	
	if ($status->getServerStatus()){
		$status->parseServerData();
		
		$serverStatus = $status->returnServerData();
		
		$players = $status->returnPlayers();
		$pings = $status->returnPings();
		$scores = $status->returnScores();
		
		?>
        	<h1>Server: <? echo $serverStatus['sv_hostname'];?></h1>      
            Admin: <? echo $serverStatus['_Admin'];?><br />
            Email: <? echo $serverStatus['_Email'];?><br />
            IRC: <? echo $serverStatus['Irc'];?><br />
            Location: <? echo $serverStatus['_Location']; ?><br />
			Website: <a href="http://<? echo $serverStatus['_Website']; ?>">http://<? echo $serverStatus['_Website']; ?></a><br /><br />

			<table width="50%" cellspacing="1" cellpadding="1" border="1">
            	<tr>
                	<td style="border:0px;" colspan="4">
                    	<img src="img<? echo $serverStatus['mapname']; ?>.jpg" alt="<? echo $serverStatus['mapname']; ?>" align="left" style="margin-right:10px;" />
                        <h3><? echo $serverStatus['mapname']; ?></h3>
                    </td>
                </tr>
            	<tr>
                	<th width="5%">#</th>
                    <th>Player</th>
                    <th width="15%">Score</th>
                    <th width="15%">Ping (ms)</th>
                </tr>
		<?
			$rank = 1;
            foreach($players as $i => $v){
        ?>
        		<tr>
                	<td><? echo $rank; ?></td>
                    <td><? echo $players[$i]; ?></td>
                    <td><? echo $scores[$i]; ?></td>
                    <td><? echo $pings[$i]; ?></td>
                </tr>
        <?
				$rank++;
            }
        ?>
            </table>           
		<?
	}
?>
Return current item: Call of Duty 4 Server Status