
21/05/2007, 06:42
|
 | | | Fecha de Ingreso: mayo-2007 Ubicación: Valladolid, España
Mensajes: 8
Antigüedad: 17 años, 9 meses Puntos: 0 | |
Novato sin control Estoy intentando controlar un dispositivo a través de web y he hecho este programa chorras que no funciona: ¿me puedes aportar alguna idea de donde puede estar fallando?:
<?php
// Get a file into an array. In this example we'll go through HTTP to get
// the HTML source of a URL.
function encender ()
{
$lines = file('Xttp://192.168.0.100/uo?d=2&n1=6&n2=1/');
echo "ENCENDIDO";
}
function apagar ()
{
$lines = file('Xttp://192.168.0.100/uo?d=2&n1=6&n2=1/');
echo "APAGADO";
}
echo "<INPUT TYPE=button VALUE=ENCENDER onClick=encender ()>";
echo "<INPUT TYPE=button VALUE=APAGAR onClick=apagar ()>";
?>
He tenido que cambiar el H por la X para que me lo deje publicar: |