Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 5 of 5
  1. #1
    Grunt
    Glory's Avatar
    Join Date
    Dec 2008
    Location
    try and find me :)
    Posts
    44
    Post Thanks / Like
    Rep Power
    16
    Reputation
    47

    (PHP) server status text


    Register to remove this ad
    (This is a Php script dont include this part)

    Code:
    
    
    <? php
     /*  Configurations */
     $host         = 'server ip;
    $host2        = 'mysql ip';
    $ftp_port     = '21';
    $web_port     = '80';
    $cpan_port    = '2082';
    $sql_port     = '3306';
    $interval     = time()+5;
    $online       = '<strong><font size="2" color="indigo">Online ^_^</font></strong>';
    $offline      = '<strong><font size="2" color="darkred">Offline ;_;</font></strong>';
     #####################################
    #  
    #    DO NOT EDIT BELOW HERE READ PLEASE
    #
    ####################
    #################
    /* Disable Error Reporting */
    error_reporting(0);
    /* Check Server Status, If Server Status Was Not Checked In Last  $interval seconds */
    if($_COOKIE["checked"] != "true")
    {
            /* Check Server Status */
            $ftp = fsockopen($host, $ftp_port, $errno, $errstr, 1);
            $web = fsockopen($host, $web_port, $errno, $errstr, 1);
            $cpan = fsockopen($host, $cpan_port, $errno, $errstr, 1);
            $sql  = fsockopen($host2, $sql_port, $errno, $errstr, 1);
            /* Workout Server Status & Set Cookie */
            if(!$ftp){ $ftp_status = $offline; setcookie("ftp_status",  "offline", $interval); } else { $ftp_status = $online; }
            if(!$web){ $web_status = $offline; setcookie("web_status",  "offline", $interval); } else { $web_status = $online; }
            if(!$cpan){ $cpan_status = $offline; setcookie("cpan_status",  "offline", $interval); } else { $cpan_status = $online; }
            if(!$sql){ $sql_status = $offline; setcookie("sql_status",  "offline", $interval); } else { $sql_status = $online; }
            /* Set Cookie To Let The Script Know, Server Status is Checked  */
            setcookie("checked", "true", $interval);
    }
    else
    if($_COOKIE["checked"] == "true")
    {
            /* Read Cookie Values */
            if($_COOKIE["ftp_status"] == "offline"){ $ftp_status = $offline;  } else { $ftp_status = $online; }
            if($_COOKIE["web_status"] == "offline"){ $web_status = $offline;  } else { $web_status = $online; }
            if($_COOKIE["cpan_status"] == "offline"){ $cpan_status =  $offline; } else { $cpan_status = $online; }
            if($_COOKIE["sql_status"] == "offline"){ $sql_status = $offline;  } else { $sql_status = $online; }
    }
    ?>





    › See More: (PHP) server status text



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Contributor
    StickyIcky's Avatar
    Join Date
    Jul 2008
    Location
    127.0.0.1
    Posts
    747
    Post Thanks / Like
    Rep Power
    18
    Reputation
    188
    Why would players need to know the FTP is online? :P

    But anyways, .

  4. #3
    Founder
    Apple's Avatar
    Join Date
    Jul 2008
    Location
    HeaveN
    Posts
    15,916
    Post Thanks / Like
    Rep Power
    10
    Reputation
    295
    +rEp =]





  5. #4
    Beginner

    Join Date
    Apr 2010
    Posts
    7
    Post Thanks / Like
    Rep Power
    15
    Reputation
    1
    It shows a blanc page for me

  6. #5
    Senior Sergeant
    .SalMAX™'s Avatar
    Join Date
    Mar 2010
    Location
    Miami, Florida
    Posts
    100
    Post Thanks / Like
    Rep Power
    15
    Reputation
    52

    Register to remove this ad
    I have seen this posted already 3 or 4 times on Ac-Web.org so I can't too many negative replys. :/
    Don't Forget to for useful releases!. It gives you good luck! Just Like Lucky charms!

 

 

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 08:33 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org