help with status svr - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with status svr (
/showthread.php?tid=592698)
help with status svr -
itachi - 28.10.2015
I need help with server status on php wev ( new php system 7.02..)
SAMP SERVER STATUS
example : IP : xx.xx.xxx.xxx
xxx
online : yes / no
players : x / 100
Re: help with status svr -
Alex Magaсa - 28.10.2015
Be more specific!
You want us to script you a PHP script that shows server information? Or you want us to fix your PHP script?(if second yes then give us the script config)
But yeah this will go to non related SA-MP.
Re: help with status svr -
Redirect Left - 28.10.2015
Not enough information given. But worth noting, the old PHP script may not work properly as the SA:MP server data has changed slightly (it now says language not map)
Re: help with status svr -
itsCody - 29.10.2015
If you want to grab server info use this:
http://pastebin.com/5H7uMdnc Westie made this but it hasn't been updated in about 4 years so I made my own changes.
PHP код:
<?php
require "sampapi.php";
$query = new SAMPAPI('IP', 'PORT');
if($query->isOnline())
{
$aInformation = $query->getInfo();
$aServerRules = $query->getRules();
echo $aInformation['hostname'];
echo $aInformation['gamemode'];
echo $aInformation['language'];
echo $aServerRules['version'];
echo $aServerRules['worldtime'];
echo $aInformation['password'] ? 'Yes' : 'No';
}
else if($query->isOffline());
?>
those are a few examples of what it can fetch you can find the original topic
here.
I use bootstrap so your errors will differ from mine. I've edited the errors to just echo lol
offline:
http://prntscr.com/8wixkr
online:
http://prntscr.com/8wiybn
player online:
http://prntscr.com/8wiysh