Website to server
#1

I want to connect My fourms to server how can i connect pls help me

I want my banned members , top score player , top time played player like that on fourms how can i got ie pls help me
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=99649
Reply
#3

You will need a MySQL based gamemode and PHP socket functions on your webhost.

However, you could display the server's statistics by using an API. The one I use is SACNR API.



By placing this code on your website you will be able to display the server's statistics:

PHP код:
<?php
    $url 
'http://monitor.sacnr.com/api/?IP=127.0.0.1&Port=7777&Action=info'//Replace the server's IP & port here
    
$data file_get_contents($url);
    if(
$data == "0")
    {
        echo 
"<font color=red>The server is offline at this moment. Please be patient.</font>"//This used to work on BroZeus API. Now is quite useless, as SACNR sends data even if the server is offline
    
}
    else
    {
        
$data unserialize($data);
        echo 
"<font color=green>Online</font><br>";
        echo 
"Hostname:<br>" .$data->Hostname;
        echo 
"<br>Map Name: " .$data->Map;
        echo 
"<br>Gamemode: " .$data->Gamemode;
        echo 
"<br>Players: " .$data->Players;
        echo 
"/" .$data->MaxPlayers;
    }
?>
You can customize it though by adding new variables or removing, or also using HTML.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)