Page 1 of 1

Server Status

Posted: Tue Sep 22, 2009 5:23 am
by Shin Noir
This is maybe for Topsy to grab and implement into the site's phpBB as a side component or something, the code likes to hang while server is down, but I just threw this together in like a few seconds.

Code: Select all

<?php
//Shin's quick hackjob server status code.
$addr = "81.169.145.66";
$port = 3306;
$churl = @fsockopen($addr, $port, $errno, $errstr, 20);
if (!$churl) echo "The Hidden Forest is DOWN";
else echo "The Hidden Forest is UP";