Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Signature to show if server is up or down.

- - - - -

  • Please log in to reply
6 replies to this topic

#1
Cyberpawz

Cyberpawz

    Newbie

  • Member
  • 21 posts
  • Joined 25-May 05
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 :)


How to remove advertisement from MSFN

#2
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • Joined 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag
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!

#3
Cyberpawz

Cyberpawz

    Newbie

  • Member
  • 21 posts
  • Joined 25-May 05

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!

<{POST_SNAPBACK}>



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

#4
Cyberpawz

Cyberpawz

    Newbie

  • Member
  • 21 posts
  • Joined 25-May 05
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 :)

#5
Cyberpawz

Cyberpawz

    Newbie

  • Member
  • 21 posts
  • Joined 25-May 05
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...tus/live2.gif";
$dead = "http://www.cyberpawz...atus/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;
}
?>



#6
gamehead200

gamehead200

    SEARCH!!! SEARCH!!!

  • Super Moderator
  • 7,039 posts
  • Joined 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag
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. :)

#7
Cyberpawz

Cyberpawz

    Newbie

  • Member
  • 21 posts
  • Joined 25-May 05

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

<{POST_SNAPBACK}>



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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users