Пример #1
0
<?php

// Crontab every 5 mins.
//$room = $_GET["r"];
//$ip = $_GET["ip"];
require_once "class.php";
$testRoom = new roomControl();
$testRoom->url = 'http://' . $ip;
$testRoom->name = $room;
$testRoom->autoOn();
//To check which box gonna be turn on.
$testRoom->autoOff();
//To check which box gonna be turn on.
/*
	if ($testRoom ->autoOn($room,$ip) == "open"){
$testRoom->turnOntable();
sleep(1);
$testRoom->turnOnAir_con();
sleep(1);
$testRoom->turnOn3();
sleep(1);
$testRoom->turnOnProjector();

	}
	

	if($testRoom ->autoOff($room,$ip) == "close"){

$testRoom->turnOfftable();
sleep(1);
$testRoom->turnOffAir_con();