
Android software's for KMtronic products
<?php $url = "http://192.168.1.199:80/status.xml"; $username = "admin"; $password = "admin"; //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); //execute post $result = curl_exec($ch); print $result; ?>
$ php web_8_relay_status.php 0 0 0 0 0 0 0 0 0
<?php $url = "http://192.168.1.199:80/FF0101"; // TURN ON Relay 1 $username = "admin"; $password = "admin"; //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); //execute post $result = curl_exec($ch); print $result; ?>5. Save the file as web_relay_1_on.php and run. ( $ php web_relay_1_on.php )