<?php
//options
$url = 'localhost';//localhost or an ip address
$port = 25565;//25565 is minecrafts default port
$pauseLength = 20;//time between killing minecraft and booting it again
//end options
$fp = @pfsockopen($url, $port);
if (!$fp) {
echo 'SERVER DOWN! Rebooting it.',"\r\n";
//kill anything with javaw.exe in the name
`Taskkill /IM javaw.exe`;
//take a nap, while minecraft shutsdown
sleep($pauseLength);
//boot minecraft
`C:\Users\user\Desktop\minecraft alpha\Minecraft_Server.exe`;
} else {
echo 'SERVER UP :)';
}
?>
© 2005-2024 Craig Mayhew