[Release][PHP] World/Login Server Status

Status
Not open for further replies.
Elite Diviner
Joined
Feb 28, 2007
Messages
446
Reaction score
5
Status.php
Demo :
PHP:
<?php
//Page Variables
    $online='<td><img src="http://on.gif"/></td>';
    $offline='<td><img src="http://off.gif"/></td>';    
//Functions
    function servercheck($server,$port){
        //Check that the port value is not empty
        if(empty($port)){
            $port=80;
        }
        //Check that the server value is not empty
        if(empty($server)){
            $server='localhost';
        }
        //Connection
        $fp=@fsockopen($server, $port, $errno, $errstr, 1);
            //Check if connection is present
            if($fp){
                //Return Alive
                return 1;
            } else{
                //Return Dead
                return 0;
            }
        //Close Connection
        fclose($fp);
    }
//Ports and Services to check
$services=array(
    '' => array('xx.xxx.xxx.xxx' => 8484),
);
?>
<table>
<?php
//Check All Services
foreach($services as $name => $server){
?>
    <tr>
    <td><?php echo $name; ?></td>
<?php
    foreach($server as $host => $port){
        if(servercheck($host,$port)){ echo $online; }else{ echo $offline; }
    }
?>
    </tr>
<?php
}
?>
Server IP Address - Please Change this for the script to work.
Code:
('xx.xxx.xxx.xxx' =>
Online / Offline Images - Make sure the URL matches they location where they are located.
Code:
http://on.gif
http://off.gif


For the sake of Locolijo having a Period , I Dont take credits for this.
 

Attachments

help it doesnt show the script O.o it shows

Code:
; $offline=''; //Functions function servercheck($server,$port){ //Check that the port value is not empty if(empty($port)){ $port=80; } //Check that the server value is not empty if(empty($server)){ $server='localhost'; } //Connection $fp=@fsockopen($server, $port, $errno, $errstr, 1); //Check if connection is present if($fp){ //Return Alive return 1; } else{ //Return Dead return 0; } //Close Connection fclose($fp); } //Ports and Services to check $services=array( '' => array('(hiding ip :D)' => 8484), ); ?>

all together >.<
 
You didn't give credits, did you?

And yes I'm on my period lolz. It last 12 months each year.


I'd have to second that, you do not take nor give credits. Giving people the assumption that this is in-fact your script due to 'your' other releases.
 
















Credits: Jvlaple for his hard work
 
Status
Not open for further replies.
Back