\n"; echo "\n"; $cnt = 0; while ( ( count(glob('ram/*.ts')) < 2 ) && ( $cnt < 25 ) ) { // wait for stream available sleep(1); $cnt++; } if ( count(glob('ram/*.ts')) < 2 ) echo "error\n"; else echo "ok\n"; echo "\n"; ?>