Hoi
Ik gooi een script de wereld in om te checken via php of jou minecraft server online is!
Hier is de code:
Ik gooi een script de wereld in om te checken via php of jou minecraft server online is!
Hier is de code:
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/**
* @author Bjarn B.
* @description Checks your the Minecraft server status
*/
/* Enter your server name */[/COLOR]
[COLOR= #0000BB]$name[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]<p>Server is</p> [/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]/* Enter your host name */[/COLOR]
[COLOR= #0000BB]$host[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]/* Enter your server port */[/COLOR]
[COLOR= #0000BB]$port[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]/* Disable errors */[/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$socket[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/fsockopen"]fsockopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$host[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$port[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$errno[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$errstr[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #FF8000]/* If it is offline, show this */[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$name[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<img src="/images/online.jpg" alt="online">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/fclose"]fclose[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$socket[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]/* If it is offline, show this */[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$name[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]<img src="/images/offline.jpg" alt="offline">[/COLOR][COLOR= #007700];
}[/COLOR]
?> 
