help with status svr
#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


Messages In This Thread
help with status svr - by itachi - 28.10.2015, 22:12
Re: help with status svr - by Alex Magaсa - 28.10.2015, 22:38
Re: help with status svr - by Redirect Left - 28.10.2015, 22:42
Re: help with status svr - by itsCody - 29.10.2015, 02:33

Forum Jump:


Users browsing this thread: 1 Guest(s)