bli q mw tanyak sintak PHP yg bisa mematikan aplikasi komputer dengan waktu..?
ini saya punya scripnya,tp yg abort tidak jalan,
<html>
<body>
<form method='POST' action='<?$PHP_SELF;?>'>
Time <input type="text" name='t' value='0' title="input harus berupah angka" autocomplete="off" onKeyPress="return angka(evt)"/> / second <br />
Command <select name="C" style="width: 150px" size="1">
<option >Select Menu</option>
<option value="Shutdown">Shutdown</option>
<option value="Abort">Abort</option>
<option value="DirC">Dir C</option>
<option value="Restart">Restart</option>
</select><br />
<input type="submit" name="submit" value="SUBMIT" />
</form>
</body>
</html>
<script type="text/javascript">
function angka(evt)
{
evt = (evt) ? evt : window.event
var intCode = (evt.which) ? evt.which : evt.keyCode
if (is_numberic($_POST['t'])){
return true;
}
else {
alert('maaf, anda harus memasukkan dalam bentuk angka bukan huruf ');
}
return false;
}
</script>
<?php
//$page = (isset($_POST['C']));
$time=$_POST['t'];
$page=$_POST['C'];
$program=$_POST['v'];
echo $page;
if ($page=='Shutdown'){
$output = shell_exec('shutdown /s /t '.$time);
echo "<pre>$output</pre>";
}
else if ($page=='Restart'){
$output = shell_exec('shutdown /r /t '.$time);
echo "<pre>$output</pre>";
}
else if ($page=='DirC'){
$output = shell_exec('dir C:\. ');
echo "<pre>$output</pre>";
}
else if ($page=='Abort'){
$output = shell_exec('taskkill /f /im '.$program.'.exe /t');
echo "<pre>$output</pre>";
}
?>