L2BattelGods Posted May 30, 2014 Posted May 30, 2014 Guys i want to make l2server status (ONlLINE,OFFLINE) and set it on webiste of serverFor Example When server is Offline to the website ... says OFFLINE When is Online to website say ONLINE !!! How can i make this????Photo Example :
0 FirefoxAurora Posted May 31, 2014 Posted May 31, 2014 (edited) <?php $server_ip = "localhost"; $loginserver_port = "7777"; $gameserver_port = "2106"; $login_status = @fsockopen( "$server_ip" , "$loginserver_port", $errno, $errstr, 0); $game_status = @fsockopen( "$server_ip" , "$gameserver_port", $errno, $errstr, 0); if($login_status){ echo"Login: Online<br />"; } else{ echo"Login:: Offline<br />"; } if($game_status){ echo" Game: Online<br />"; } else{ echo" Game: Offline<br />"; }; mysql_close($connect); ?> Credits : Falcon Login Server <?php $status = @fsockopen("127.0.0.1", 2106, $errno, $errstr, 1); if($status >= 1) { echo '<img src=images/on.png>'; } else { echo '<img src=images/off.png>'; } ?> Game Server <?php $status = @fsockopen("127.0.0.1", 2106, $errno, $errstr, 1); if($status >= 1) { echo '<img src=images/on.png>'; } else { echo '<img src=images/off.png>'; } ?> At <img src=images/on.png> replace with your image Edited May 31, 2014 by FirefoxAurora
0 FirefoxAurora Posted May 31, 2014 Posted May 31, 2014 THNXXXXX MAN REALLY THNX !!!!!!! Your welcome
0 L2BattelGods Posted May 31, 2014 Author Posted May 31, 2014 a last question ... i make it this with php code ... did you know how i make it with HTML Scripts?
0 FirefoxAurora Posted May 31, 2014 Posted May 31, 2014 you cant have scripts into html, just add the code there you need and save as .php that's all.
0 L2BattelGods Posted May 31, 2014 Author Posted May 31, 2014 man send me your skype name if you want to tell you something about this
0 Strain Posted June 1, 2014 Posted June 1, 2014 man send me your skype name if you want to tell you something about this Just copy/paste the code in the html file and rename it from index.html to index.php and it will be fixed. You won't be able to see results in your computer, you'll need to upload the website so you can see if it actually works.
Question
L2BattelGods
Guys i want to make l2server status (ONlLINE,OFFLINE) and set it on webiste of server
For Example When server is Offline to the website ... says OFFLINE
When is Online to website say ONLINE !!! How can i make this????
Photo Example :
9 answers to this question
Recommended Posts