Looking for ftp server status script

Discussion in 'PHP' started by weedman, Feb 4, 2009.

  1. #1
    im looking for script that checks remote ftp server status are online or offline,
    nice if i can add 5+ remote servers for checking status...
    i have only found http server status script
     
    weedman, Feb 4, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Assuming it uses something like fsockopen just change the port to 21. or append :)21).

    Dan

    (Or whatever port the FTP server is on.)
     
    Danltn, Feb 4, 2009 IP
  3. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #3
    shallowink, Feb 4, 2009 IP
  4. weedman

    weedman Guest

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    shallowink thats a good tool to, but i was looking script where i add about 5 + server addresses and it displays to the customers server statuses
     
    weedman, Feb 4, 2009 IP
  5. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #5
    Just take that script and use a Loop to call the server check function. something like

    $hosts_to_check = ("ftp://host1.com","ftp://host2.com", "ftp://host3.com") ;
    foreach ($hosts_to_check as $host) {
    $result = pingDomain($host)
    if($result == "-1") { echo "Host is down"; }
    else { echo "host is up"; }
    }

    Would have to be a little bit more involved and could be wrong. Its a quick starting point.
     
    shallowink, Feb 4, 2009 IP