Dm, нахрен выдумывать.
Надо перво-наперво спросить возможно ли exec запускать.
if (answer==true){
exec("unzip -o \\"$DOCUMENT_ROOT/$dir$file_name\\" -d $DOCUMENT_ROOT/$dir");
$d=opendir($dir);
while(($e=readdir($d))!==false){
if ($e!="." && $e!="..")
if (stristr($e, ".pbo")) $pbo=true;
if (stristr($e, ".exe") || stristr($e, ".com") || stristr($e, ".bat")) $exe=true;
}
closedir($d);
if (@$pbo && !@$exe) mail(......);