-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcod4.php
36 lines (27 loc) · 926 Bytes
/
cod4.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
$servers['quakeserver'] = array('quake3', 'Server_ip_here', '28960');
require_once 'gameq/GameQ.php';
// Initialize the class
$gq = new GameQ;
// Add the servers we just defined
$gq->addServers($servers);
// Request the data, and display it
try {
$data = $gq->requestData();
//print_r($data);
}
// Catch any errors that might have occurred
catch (GameQ_Exception $e) {
echo 'An error occurred.';
}
$servername=$data['quakeserver']['sv_hostname'];
// $maxping=$data['quakeserver']['sv_maxPing'];
// $voice=$data['quakeserver']['voice'];
// $version=$data['quakeserver']['shortversion'];
$maxclient=$data['quakeserver']['sv_maxclients'];
$online=$data['quakeserver']['g_humanplayers'];
$mapname=$data['quakeserver']['mapname'];
//$modname=$data['quakeserver']['fs_game'];
$mapstart=$data['quakeserver']['g_mapStartTime'];
$uptime=$data['quakeserver']['uptime'];
?>