Help - Search - Members - Calendar
Full Version: Signature to show if server is up or down.
MSFN Forums > Customizing Windows and Graphics > Graphics and Designing Art > Signatures

   
Google Internet Forums Unattended CD/DVD Guide
Cyberpawz
Ok, day one here and I got a huge question.

I own a server, and yes ok I know I'm going to get hammered here but I'm on a Mac... tongue.gif

In any case, here are my server stats for the info... now don't expect much to be different on a Mac or PC when it comes to Apache and the rest, it's all still server side fun stuff...

PHP Version 4.3.9
Apache Version 2.0.52
MySQL Version 4.0.17

Yes I know some is out of date, but the issue is that there is a new version coming out soon for the Mac and I'm waiting till it goes to stable version, and not beta...

Now here is my question...

I see these signatures with images saying "Your IP, etc is"...

I'm looking to do something a little different. What I'm looking to do is to make a script that would say is a server is up and running... and if it's not to point to another server and say the server is down...

So it will be something like this:

If the server is up, and can access the script the message will say:

The server is up (with a green light)

If the server is down, it then it would point to another server and on the signature it would say:

The server is down (with a red light)


And with that there will be an image or animation in the background that will "envelop" this text...

Is this even possible? And if so how?

Thanks for the help it would be greatly appreciated smile.gif
gamehead200
Its possible using PHP...

Go to http://hotscripts.com and look for a script that can ping a server and tell you if its online or offline... newwink.gif

Instead of text, you can tell it to output an image! newwink.gif Very easy to do!
Cyberpawz
QUOTE (gamehead200 @ May 25 2005, 05:12 PM)
Its possible using PHP...

Go to http://hotscripts.com and look for a script that can ping a server and tell you if its online or offline... newwink.gif

Instead of text, you can tell it to output an image! newwink.gif  Very easy to do!
*



I hate to sound like a noobie, but how do I actually make it work as a signature?
Cyberpawz
Also I've looked at the site already it has a good concept, but nothing like what I was looking for originally... that is sort of why I asked here smile.gif
Cyberpawz
I found this scrip, I want to know how would I make this into something like the :your IP: sigs?

Also there are things in here I know I am missing, can someone please help me, unthankfully I'm not a PHP guru...


QUOTE
<?php

$live = "http://www.cyberpawz.com/status/live2.gif";
$dead = "http://www.cyberpawz.com/status/dead.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;
}


$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;
}
?>
gamehead200
Before even playing around with these scripts, I suggest reading up a bit on PHP that way you can get the hang of it.

What you found WILL work... Just put it in a PHP file and link to it. smile.gif
Cyberpawz
QUOTE (gamehead200 @ May 25 2005, 07:03 PM)
Before even playing around with these scripts, I suggest reading up a bit on PHP that way you can get the hang of it. 

What you found WILL work... Just put it in a PHP file and link to it. smile.gif
*



Only problem I see is this, it's using images inside what would placed inside an image correct?
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.