Link here http://api.iamphoenix.me/index.php
This is showing the players and whether the server is online or offline.
I would like to learn how to make it auto-refresh every 5 minutes or when a player joins the server.
$status = json_decode( file_get_contents('http://api.iamphoenix.me/status/?server ... clean=true'), true); $playercount = json_decode( file_get_contents('http://api.iamphoenix.me/players/?serve ... clean=true'), true); if($status['status'] == 'true') { // Use any command in here you like to execute if the server is online, echo "something" would print out 'something' echo 'Prison: Online'; echo '<br>'; echo 'Players: ' . $playercount['players'] . '/' . $playercount['players_max']; } else { // Same thing here, however this is for when the server is offline. echo 'Prison: Offline'; }