I got this...
PHP Code:
<?php
function getStatus()
{
return file_get_contents("status.txt");
}
function changeStatus($status)
{
if($status != "true" || $status != "false")
{
echo "Wrong status input";
exit;
}
else
{
$f = file_put_contents("status.txt", $status);
if(!$f)
{
echo "Error changing status";
exit;
}
else
{
return true;
}
}
}
if($_GET['opt'] == "scar")
{
$form = false;
if($_POST)
{
$pass = $_POST['auth'];
if($pass != "xmx876s")
{
echo "Wrong password";
exit;
}
$status = $_POST['status'];
if(changeStatus($status))
{
echo "Success";
exit;
}
}
}
else
{
$form = true;
if($_POST)
{
$pass = $_POST['auth'];
if($pass != "xmx876s")
{
echo "Wrong password";
exit;
}
$status = $_POST['status'];
if(changeStatus($status))
{
echo "Success";
exit;
}
}
}
if($form)
{
?>
<form method="post" action="<?=$_SERVER['PHP_SELF'];?>">
<b>Set status:</b> <label>True<input type="radio" name="status" value="true" /></label>
<label>False<input type="radio" name="status" value="false" /></label><br />
<b>Password:</b> <input type="text" name="pass" type="password" />
<input type="submit" name="manual" value="Change" />
</form>
<?php
}
?>
You can load webpage.com/status.txt in to SCAR and see if it has to go to sleep
You'd have to make a SCAR script with PostHTTPPageEx(Client, 'webpage.com/sleep.php?opt=scar'); OR go to the page manually.