Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
Cyberpawz

Signature to show if server is up or down.

7 posts in this topic

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... :P

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 :)

0

Share this post


Link to post
Share on other sites

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... ;)

Instead of text, you can tell it to output an image! ;) Very easy to do!

0

Share this post


Link to post
Share on other sites
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... ;)

Instead of text, you can tell it to output an image! ;)  Very easy to do!

I hate to sound like a noobie, but how do I actually make it work as a signature?

0

Share this post


Link to post
Share on other sites

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 :)

0

Share this post


Link to post
Share on other sites

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...

<?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;

}

?>

0

Share this post


Link to post
Share on other sites

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. :)

0

Share this post


Link to post
Share on other sites
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. :)

Only problem I see is this, it's using images inside what would placed inside an image correct?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.