IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
2 Pages V   1 2 >  
Reply to this topicStart new topic

Server Status

, MAke Your own server status in PHP


Mistikpso
no avatar
Member [Level 3]
******
Group: Members
Posts: 99
Joined: 7-October 04
Member No.: 1,482



Post #1 post Jul 21 2005, 01:39 AM
My Friend and i made an mmorpg we decided to make a code so the users could tell when the game server was running

this codoe has many other uses to like monitor a website or w/e you want to do.

CODE
<?
$ip = "youriphere";
$port = "yourporthere";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
echo '<B><FONT COLOR=lime>Online</b></FONT>';
fclose($sock);
}
?>


-open a text editor like notepad
-Put this code in your <Body> of index.html or w/e page you are using
-after you finish adding the code make sure you set the port and IP
-and when you add all the data save your file as index.php
-upload the file
-Finished ~ your server status is set ~

This post has been edited by Mistikpso: Apr 11 2008, 08:42 PM
Go to the top of the page
+Quote Post
Florisjuh
no avatar
Proud to be hosted
*********
Group: Members
Posts: 992
Joined: 11-July 04
From: NL
Member No.: 75



Post #2 post Jul 21 2005, 11:34 AM
Very nice tutorial, I've been looking for a script like this to monotor my Wolfenstein Enemy Teritory game servers, and put some information about it on my trap17 website (I run a clan)...

[note=snlildude87]Seriously, did you have to quote the entire post? When there are no quotes, it's understood that you're replying to the first post in the thread.[/note]

This post has been edited by snlildude87: Jul 21 2005, 04:38 PM
Go to the top of the page
+Quote Post
mizako
no avatar
Super Member
*********
Group: Members
Posts: 372
Joined: 16-August 04
From: Spain
Member No.: 824



Post #3 post Jul 21 2005, 11:51 AM
I agree it is an easy but useful script. However i could not watch your script in action. It seems your link is a broken one.

[note=snlildude87]Seriously, did you have to quote the entire post? When there are no quotes, it's understood that you're replying to the first post in the thread.[/note]

This post has been edited by snlildude87: Jul 21 2005, 04:38 PM
Go to the top of the page
+Quote Post
Mistikpso
no avatar
Member [Level 3]
******
Group: Members
Posts: 99
Joined: 7-October 04
Member No.: 1,482



Post #4 post Jul 21 2005, 02:24 PM

i just tested the link and it seems fine - it might take a second to see the main page.
Go to the top of the page
+Quote Post
snlildude87
no avatar
Moderator
***************
Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Post #5 post Jul 21 2005, 04:39 PM
After two posts, I have to say something...please do not quote the first post in the thread. It's all understood.

Thank you.
Go to the top of the page
+Quote Post
rvalkass
no avatar
apt-get moo
***************
Group: [MODERATOR]
Posts: 2,301
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol
myCENT:95.80



Post #6 post Jul 21 2005, 05:19 PM
I have seen a few of these, but I always thought they were long and complicated. Thanks very much for this script.
Go to the top of the page
+Quote Post
Saint_Michael
no avatar
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************
Group: [HOSTED]
Posts: 6,933
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew
myCENT:18.70



Post #7 post Jul 22 2005, 01:19 AM
hmmm not bad of a scriptm could be useful on alot of gaming servers. kudos
Go to the top of the page
+Quote Post
Mistikpso
no avatar
Member [Level 3]
******
Group: Members
Posts: 99
Joined: 7-October 04
Member No.: 1,482



Post #8 post Jul 22 2005, 02:51 PM
yeah im putting a LDU800 on my site so i have to get rid of the demo - sry
Go to the top of the page
+Quote Post
engalex
no avatar
Newbie [Level 1]
*
Group: Members
Posts: 23
Joined: 17-July 05
Member No.: 9,523



Post #9 post Jul 24 2005, 05:54 AM
nice man
biggrin.gif
Go to the top of the page
+Quote Post
Dynomite
no avatar
Member [Level 1]
****
Group: Members
Posts: 54
Joined: 31-July 05
Member No.: 10,089



Post #10 post Aug 2 2005, 11:58 PM
Nice script, I also made a slight change for anyone who wants it.

If you are are hosted on Trap17 and you have an upload module that uses FTP you can modify this to check if the uploader will work by setting using these settings.
$ip = "69.50.188.18";
$port = "21";

So your overall-all script would be
CODE
<html>
<body>

<?php

$ip = "69.50.188.18";
$port = "21";
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<div align="center">The upload is <font color=red><b>Offline</b></FONT></div><br><br>';
else{
echo '<div align="center">The upload is: <font color=green><b>Online</b></FONT></div><br><br>';
fclose($sock);
}

?>

</body>
</html>
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 7 templest 651 13th August 2004 - 11:40 PM
Last post by: odomike
No New Posts   13 galexcd 1,034 14th August 2007 - 01:25 PM
Last post by: Galahad
No New Posts   0 OpaQue 676 9th September 2004 - 08:40 AM
Last post by: OpaQue
No New Posts   2 chinfo 513 30th July 2004 - 01:45 AM
Last post by: chinfo
No New Posts   5 dejo 532 7th August 2004 - 02:07 PM
Last post by: psp-playstation
No New Posts   5 outwarsecrets 601 16th August 2004 - 06:40 AM
Last post by: stephenob
No New Posts   9 Panzer 758 4th January 2007 - 08:52 PM
Last post by: fffanatics
No New Posts   7 Raptrex 596 27th August 2004 - 11:16 PM
Last post by: Spectre
No New Posts 3 NuHoaXuLa 649 17th November 2006 - 08:33 AM
Last post by: farsiscript
No New Posts   0 sekundar 756 26th July 2006 - 07:35 AM
Last post by: sekundar
No New Posts   1 truvu17 493 21st September 2004 - 09:12 AM
Last post by: OpaQue
No New Posts   0 aoehq 1,101 17th March 2007 - 06:20 AM
Last post by: aoehq
No New Posts   0 Bimboadmasministries 598 8th October 2004 - 11:45 AM
Last post by: Bimboadmasministries
No New Posts   0 Bimboadmasministries 471 8th October 2004 - 11:55 AM
Last post by: Bimboadmasministries
No New Posts   10 newbie_dhkt 585 2nd January 2009 - 11:46 AM
Last post by: triplebtalk