04.04.2015, 05:36
Quote:
I don't need to send info to server. I need to parse it to data and get parameters to show how much is players, is server on, off, what is gamemode and etc.
|
Now here is example script which shows server info using above api which i mentioned :
PHP код:
<?php
require("SampQueryAPI.php");
$query = new SampQueryAPI('127.0.0.1', '7777');//change ip and port here
if(!$query->isOnline())
{
echo "Server Offline";
exit();
}
$info = $query->getInfo();
var_dump($info);
?>