I was wondering if it's possible to turn lamp on from a PHP script on an external server.
set lamp on with url works: http://myurl:8080/json.htm?type=command ... itchcmd=On
now on external website in php code:
But this doen'st work:
Code: Select all
<?php
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://url:8080/json.htm?type=command¶m=switchlight&idx=57&switchcmd=On");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
?>
I also checked fopen; Anybody an idea? or am i looking in the wrong direction?