<?php
try{
	$fechaHoy = date("Ymd");

	if ($handle = opendir('zip/')) {
		while (false !== ($file = readdir($handle)))
		{
			if ($file != "." && $file != ".." && strtolower(substr($file, strrpos($file, '.') + 1)) == 'zip')
			{
				//echo $thelist .= '<li><a href="'.$file.'">'.$file.'</a></li>';
				if(substr($file,0,8) < $fechaHoy){
					if(is_file('zip/'.$file)){
						unlink('zip/'.$file);
					}
				}
			}
		}
		closedir($handle);
		echo "TRUE";
	}
}catch(Exception $e){
	echo "FALSE";
}
?>