Jump to content

[Request]Server Status.

Recommended Posts

  • 1 month later...

Put this in your site

<?php include "config/config.php" ?> 

    //if ($server && $port && $timeout) {
        $game =  @fsockopen("$server", $portg, $errno, $errstr, $timeout);
        $login =  @fsockopen("$server", $portl, $errno, $errstr, $timeout);
    if($login) {
        echo "<p style='margin-top: 15px;'>Login: <font color=#00DF00>Online</font><br /></p>";
    else {
        echo "<p>Login: <font color=#FF0000>Offline</font><br /></p>";
    if($game) {
        echo "<p>Game: <font color=#00DF00>Online</font><br /></p>";
    else {
        echo "<p>Game: <font color=#FF0000>Offline</font><br /></p>";
    echo "";

and config.php file looks like this

    $server  = "yourserver.eu"; //you can put ip adress or domain name
    $portg   = "7777";
    $portl   = "2106";
    $timeout = "1";


Remember that the first part of code need to be placed in php file. ;)

Edited by yaotzi9n
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock