Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 7 of 7

Thread: live server component status

  1. #1
    stealthhosts is offline Senior Member
    Join Date
    Jul 2005
    Posts
    208

    Default live server component status

    PHP Code:
    <?php 
    $data 
    .= 
    <style> 
    td,body 

        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #444444; 

    </style> 
    <br> 
        <center> 
         <div style=\"border-bottom:1px #999999 solid;width:480px;\"><b> 
           <font size='1' color='#3896CC'>Service Status</font></b> 
         </div> 
       </center> 
    <br>"


    //configure script 
    $timeout "1"

    //set service checks 
    $port[1] = "80";       $service[1] = "Apache";                  $ip[1] =""
    $port[2] = "21";       $service[2] = "FTP";                     $ip[2] =""
    $port[3] = "3306";     $service[3] = "MYSQL";                   $ip[3] =""
    $port[4] = "25";       $service[4] = "Email(POP3)";             $ip[4] =""
    $port[5] = "143";      $service[5] = "Email(IMAP)";             $ip[5] =""
    $port[6] = "2095";     $service[6] = "Webmail";                 $ip[6] =""
    $port[7] = "2082";     $service[7] = "Cpanel";                  $ip[7] =""
    $port[8] = "80";       $service[8] = "Internet Connection";     $ip[8] ="google.com"
    $port[9] = "2086";     $service[9] = "WHM";                     $ip[9] =""

    //count arrays 
    $ports count($port); 
    $ports $ports 1
    $count 1

    //beggin table for status 
    $data .= "<table width='480' border='1' cellspacing='0' cellpadding='3' style='border-collapse:collapse' bordercolor='#333333' align='center'>"

    while(
    $count $ports){ 

         if(
    $ip[$count]==""){ 
           
    $ip[$count] = "localhost"
         } 

            
    $fp = @fsockopen("$ip[$count]"$port[$count], $errno$errstr$timeout); 
            if (!
    $fp) { 
                
    $data .= "<tr><td>$service[$count]</td><td bgcolor='#FFC6C6'>Offline </td></tr>"
            } else { 
                
    $data .= "<tr><td>$service[$count]</td><td bgcolor='#D9FFB3'>Online</td></tr>"
            } 
        
    $count++; 




    //close table 
    $data .= "</table>"

    echo 
    $data
    ?>
    Simply paste this into your page to display server status of the current box.

    Can be seen in action here : http://stealthhosts.com/support/supp...ver_status.php



    EDIT - forgot to add that it is currently coded for showing linux CPANEL status. VERY easy to edit though, simply change the port numbers and their descriptions to display whatever you like (windows or NIX)

    e.g - to monitor a windows box running IIS on port 8080, simply change:

    PHP Code:
    $port[1] = "80";       $service[1] = "Apache";                  $ip[1] =""
    to

    PHP Code:
    $port[1] = "8080";       $service[1] = "IIS";                  $ip[1] =""

  2. #2
    ovi Guest

    Default Hello

    Very cool script, thanks to showing this to us.

    Ovi

  3. #3
    Paul_KY is offline Senior Member
    Join Date
    Aug 2004
    Posts
    1,285

    Default

    I'm not sure I understand. Are you saying I can paste this on any page and know the uptime of my site?
    "There's no such thing as impossible. It's a myth. Don't believe it."

  4. #4
    Duke Guest

    Default

    That's fantastic, I may actually take it for a spin.

    Thanks man!

  5. #5
    stealthhosts is offline Senior Member
    Join Date
    Jul 2005
    Posts
    208

    Default

    Quote Originally Posted by Paul_KY
    I'm not sure I understand. Are you saying I can paste this on any page and know the uptime of my site?
    Hi Paul,
    This script is written in PHP so you must have PHP enabled on your windows/linux box, then yes, it will work as shown on the example page.

    Let me know if you want any further help

    If you want uptime (ie, this server has been up 200days) then let me know and I will code something to show that.

  6. #6
    Paul_KY is offline Senior Member
    Join Date
    Aug 2004
    Posts
    1,285

    Default

    Are your servers based in the U.S.? Do you run dedicated site servers?
    "There's no such thing as impossible. It's a myth. Don't believe it."

  7. #7
    stealthhosts is offline Senior Member
    Join Date
    Jul 2005
    Posts
    208

    Default

    Hi Paul,
    We have servers in seattle, washington peered with Ibm, Microsoft and Symantec and we also have servers in the UK held in Telehouse in london on the UK pipeline. We offer shared hosting, virtual private servers, dedicated servers and co-location for your own hardware.

    Lewis

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Feeds live on UK WW
    By vicdigi in forum About UK Webmaster Forums
    Replies: 3
    Last Post: 11-30-2007, 11:40 AM
  2. Does PayPal verified status affect your decisions?
    By temi in forum General Webmaster Talk
    Replies: 8
    Last Post: 06-12-2007, 11:09 AM
  3. So did PayPal discountinue their Status Counter thing?
    By SponSpot in forum General Webmaster Talk
    Replies: 1
    Last Post: 04-18-2007, 07:17 AM
  4. AdWords PPA Going Live in US
    By temi in forum AdWords
    Replies: 0
    Last Post: 04-01-2007, 05:03 AM
  5. mx2k4pro > using loader component
    By crowebird in forum General Webmaster Talk
    Replies: 6
    Last Post: 01-20-2005, 07:35 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124