I was bored.
Basic port query script, you will just need to add your ip and off you go!
Code:
<?php
$server = "127.0.0.1";
$port = "43594";
$timeout = "10";
if ($server and $port and $timeout) {
$server1 = @fsockopen("$server", $port, $errno, $errstr, $timeout);
}
if($server1) {
echo "YOURSERVER is Online!";
}
else {
echo "YOURSERVER is Offline!";
}
?>
As I said, This is basic code meant for you to start with and make it look good.
Cool things to do would be adding colour to it. EG,Green for online and red for offline or even add an image to it.
Below are some basic things you can do with it.
If you want to use an Image use this:
Code:
<?php
$server = "127.0.0.1";
$port = "43594";
$timeout = "10";
if ($server and $port and $timeout) {
$server1 = @fsockopen("$server", $port, $errno, $errstr, $timeout);
}
if($server1) {
echo "<img src='yourimage.jpg'>";
}
else {
echo "<img src='yourimage2.jpg'>";
}
?>
If you want to use Color use this:
Code:
<?php
$server = "127.0.0.1";
$port = "43594";
$timeout = "10";
if ($server and $port and $timeout) {
$server1 = @fsockopen("$server", $port, $errno, $errstr, $timeout);
}
if($server1) {
echo "<font color='green'>YOURSERVER is Online!</font>";
}
else {
echo "<font color='red'>YOURSERVER is Offline!</font>";
}
?>
Please leave a reply/feedback.
If you need help just post below or PM me