help with status svr
#1

I need help with server status on php wev ( new php system 7.02..)

SAMP SERVER STATUS

example : IP : xx.xx.xxx.xxxxxx
online : yes / no
players : x / 100
Reply
#2

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.
Reply
#3

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)
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)