I was wondering if anyone has ever put something on a website that told if a certain mud was up or down. If not, does anyone have any idea's on how it could be done? I know this is probably related to a cgi or something else but I really don't have a clue where to begin. I thought it might be convenient, so players would know not to just sit and try to connect for an hour. Anyways, all help is always appreciated.
Like Nick mentioned, there is a Java Telnet Appplet that can connect to different MUDs on the MUDConnector website. If you wish to have something similar you can get basicly the same thing at www.first.gmd.de/persons/leo/java/Telnet It can telnet into your MUD, or into another if you wanted.
Maybe you could try PHP, if you want only to see if it is up (think you want).
if you supply to check.php somethink like this:
<?php
$status = fsockopen( "my.mud.site.org", 4000, $errno, $errstr, 2 );
if ($status) {
echo "Mud is Online";
fclose($status);
} else {
echo "Mud is Down :(";
}
?>
You need site with PHP support and enabled network functions of php. (Some have this disabled due to security)
$errno is error code ( 0 = noerror )
$errstr returns error message, 2 is timeout in seconds. In php4 might be <1, 100ms timeout = 0.1
I didnt tried it now, it may not work.
Thanks for all the suggestions. I went with the PHP, and with a tiny bit of tinkering to fit it to what I needed it worked perfectly. Thanks so much, its great :)