• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook pagefor updates, or we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.)

Creating a Server Status script with PHP

Status
Not open for further replies.
Banned
Banned
Joined
Mar 4, 2006
Messages
575
Reaction score
4
Notice: This script needs PHP!
Download: See the attachment.

Explanation of the variables.
$port[#] - The port the server uses.
$Service[#] - The name it should show in the table.
$ip[#] - The IP the server is running on. (External or Hamachi IP)
$icon[#] - The icon in front of each server. The path should lead to it's location.
$alt[#] - The text it should show when you hover over the icon.

Each server get's a new number. So if it's the first one, every [#] Should become [1]. The second one gets [2], etc.
To change the port, service name, etc. Only change the part between quotes ("text")
The icon path is the location from where the php is located. So if the file is in [pie]"root/files/status.php"[/pie]and the image is in [pie]"root/files/images/habbo.jpg"[/pie]then the location should be [pie]" /images/habbo.jpg"[/pie]

How to add/edit/delete servers.
To add, just copy a row, and add 1 to the number between brackets.
Example: $port[1] becomes $port[2]

Part to edit
PHP:
//set service checks
$port[1] = "1234";            $service[1] = "Habbo Server 1";                     $ip[1] = "127.0.0.1";    $icon[1] = "habbo.jpg";        $alt[1] = "Server 1";
$port[2] = "80";            $service[2] = "Website";                        $ip[2] = "127.0.0.1";    $icon[2] = "web.png
";    $alt[2] = "Website";
(Port 80 is the default website port)

Now, to add it in your webpage.
Open your normal site editor, like Frontpage or Dreamweaver.
Find the perfect location and add the following code: [pie]<?php include(server.php); ?>
Ofcourse, if the file is located somewhere else, just edit the parts between ().
Now save the files and upload everything, including the images.

For questions, PM me.
 

Attachments

You must be registered for see attachments list
Status
Not open for further replies.
Back
Top