Blame |
Last modification |
View Log
| SVN
| RSS feed
<?php
$DEBUG = false;
//$DEBUG = true;
include('config.php');
{
$remote = $_REQUEST["remote"];
$state = $_REQUEST["state"];
$code = $_REQUEST["code"];
$button = $_REQUEST["button"];
if ($DEBUG)
{
echo "remote=".$remote." button=".$button." code=".$code." state=".$state;
}
if ($state=="Pressed")
{
$message1 = "ServiceManager.getService(\"Can\", \"irTransmit\", ".$irTransmitterID.").sendButton(\"".$remote."\", \"".$button."\", true);\n";
}
else
{
$message1 = "ServiceManager.getService(\"Can\", \"irTransmit\", ".$irTransmitterID.").sendButton(\"".$remote."\", \"".$button."\", false);\n";
}
$message2 = "quit();\n";
$socket = socket_create(AF_INET
, SOCK_STREAM
, 0) or
die("could not connect to atom");
echo "Sent $button successfully";
}
?>