Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

script to display server status?

I am looking for some kind of script that I can put onto a webpage that displays the status of the services on the web server; like HTTP, FTP, POP, and so on.

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    Example of how to do it in PHP:

    <?php

    $address =" trap17.com"; //Here you can specify the address you want to check ports

    $port = "80"; //Here you can specify the port you want to check from $address

    $checkport = fsockopen($address, $port, $errnum, $errstr, 2); //The 2 is the time of ping in secs

    //Here down you can put what to do when the port is closed

    if(!$checkport){

    echo "The port ".$port." from ".$address." seems to be closed."; //Only will echo that msg

    ?>

    Change port 80 to whatever port/service you want to check. Eg. FTP port is 21

  • 1 decade ago

    A very good (paid) one I've found is Status2K from http://www.status2k.com/ . Should have everything you need and more. :)

Still have questions? Get your answers by asking now.