I am trying to make a dynamic signature that shows the status of a server online, but it is not working, these are my scripts (with websites removed) And i have installed the script to my .htaccess to rewrite the png to php
status2.png
Code: Select all
<?php
Header("Content-type: image/png");
//***************
//The status checking script
//meddle at your own risk!
//check for port number, default is 80
$addr = "mckooter.com";
$port = 80;
//Test the server connection
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
//echo $errstr;
$onoff = "online.gif";
}
else {
$onoff = "offline.gif";
}
include('status2p.php');
?>status2p.php
Code: Select all
<?php
header("Content-type: image/png");
$im = imagecreatefromgif($onoff);
imagepng($im);
imagedestroy($im);
?>it just shows me the image path as the image, firefox is now recognizing it as an image so i know ive got further, any help would be greatly appreciated