camera pitaru http://86.34.213.64:1081
camera episcop radu http://109.100.153.62:81
alarma http://86.34.213.64:1082
placa http://86.34.213.64:8085 dvr pitaru http://86.34.213.64:1083
";
foreach($xml->children() as $child){
//echo $child->getName() . ": " . $child . "
";
if ($child->getName()=='led3' and $child=='1'){
echo "$child->name()". "
";
echo "333". "
";
}
else
echo "EROARE". "
";
}
echo '';
print_r(localtime(time(), true));
echo '
';
$t=getdate();
$year=$t['year'];
$luna=$t['month'];
$day=$t['mday'];
$ora=$t['hours'];
$minute=$t['minutes'];
echo "an = ".$year."
";
echo "luna = ".$month."
";
echo "day = ".$day."
";
echo "ora = ".$ora."
";
echo "minute = ".$minute."
";
$file='test.txt';
$fo = fopen($file, "ab");
$context = file_get_contents($file); // Preia continutul fisierului
$context.="$day"."-"."$luna"."-"."$year"."/"."$ora".":"."$minute"." ";
file_put_contents($file, $context); // Adauga continutul din $context in $file
echo "$context";
echo "
";
fclose($fo);
?>