$value) { $URL=$URL.'&'.$key; $URL=$URL.'='.$value; } $response =file_get_contents($URL); //Read status $xml = new SimpleXMLElement($response); $RelayNames; $RelayStates; $i=0; foreach($xml as $key => $val) { $RelayStates[$i]=$val->State; $RelayNames[$i]=$val->Name; $i++; } ?>

smartDEN LAN Ethernet 16 Relay Module

PHP DEMO - HTTP/API Edition

Please note that in order to work with this demo, you need to have the following settings for the smartDEN module

Enable XML Access - ON, Encrypt XML Password - OFF and Multiple XML Access - ON

 

'); printf(''); printf(''); if ($RelayStates[$i]==1) $value='0'; else $value='1'; printf(''); } ?>
IP: , password:
No
Relay Name
Control
'.($i+1).'
'.$RelayNames[$i].'
'.$RelayStates[$i].'