<?php require_once("config.php"); $d=opendir("formats/12"); while ($c=readdir($d)) { if (substr($c,-4)==".key" || substr($c,0,1)==".") continue; if (is_file("formats/12/$c") && !is_file("formats/12/".$c.".key")) { echo "$c"; flush(); exec("./flvkey <formats/12/$c >formats/12/".$c.".key"); echo " done\n"; flush(); } } ?>