comment the line header("Location:
http://192.168.2.117/ejecuta.php?valor=".$FCODE.$IRCODE);
becouse if the raspberry is not operative it don't shoot down.