<?php
//Web Server Status v 1.2, Copyright 2002 By Ryan Schwiebert, visit
http://www.schwebdesigns.com/
//This script may be freely distributed providing all copyright headers are kept intact.
//Concept from:
//Abax Server Status v1.04, Copyright 2002 By Nathan Dickman, visit
http://www.NathanDickman.com/
//Location of the live or dead server images
//Please change to your server specifications
$live = "http://possum.ints.ru/modules/on.gif";
$dead = "http://possum.ints.ru/modules/off.gif";
//The status checking script
//meddle at your own risk!
//check for port number, default is 80
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 80;
}
//Test the server connection
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 5);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>