• server staus php

    From dream master@44:100/0 to All on Thu Mar 9 23:08:00 2017
    what im about post below was a php i used to use on my old bbs site to see if it was online of offline and im sure its changed with the versions of php.
    any one see the changed needed because i tried the webline in it and the site is gone
    --//--------------------
    <?php
    //Web Server Status v 1.4, Copyright 2002 By Ryan Schwiebert, visit http://www.schwebdesigns.com/
    //This script may be freely distributed providing all copyright headers are kept intact.

    $live = "/status/live2.gif";
    $dead = "/status/dead2.gif";
    //The status checking script
    //meddle at your own risk!
    //check for port number, default is 80
    $link = $_GET['link'].":";
    $s_link = str_replace("::", ":", $link);
    list($addr,$port)= explode (':',"$s_link");
    if (empty($port)){
    $port = 80;
    }

    //Test the server connection
    $churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
    if (!$churl){
    //echo $errstr;
    header("Location: $dead");
    }
    else {
    header("Location: $live");
    }
    function server($addr){
    if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
    return $addr;
    }


    i used it like this...

    <tr>
    <td width="20%"><font face="Arial, Helvetica, sans-serif" size="2"><b>telnet</b></font></td>
    <td width="20%"><img src="status.php?link=dreamland.darktech.org.org:23" width="37"
    height="20"></td> </tr>

    |08 .|05|13|15Dr|07e|08am Ma|07st|15er|13|05|08.
    |08 |05|13 |13|05|08
    |11 DoRE|03!|11ACiDiC|03!|11Demonic |08[|15dreamland|09.|15darktech|09.|15org|08]

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: --[!dreamland BBS dreamland.darktech.org (44:100/0)