rendered paste body<?
// leggo il contenuto di trace e lo arrotondo
$file = fopen("txt/trace.txt", "r");
$Buffer = fgets($file , 4096);
// leggo seconda riga del file
$Buffer = fgets($file , 4096);
$secondi = array();
list($min,$sec) = explode(":",$Buffer);
if (file_exists($file) && $min != "CL") {
} else
{
$secondi = split(",",$sec);
$AttesaInSecondi = $min * 60 + $secondi[0];
if ($AttesaInSecondi >= 120 && $AttesaInSecondi<=240 ){
$cmd = "/usr/bin/mpg123 /opt/lampp/htdocs/sounds/arrivo.mp3";
system($cmd);
}
}
fclose($file);
?>