#!/usr/bin/php 4GB //$file_size = $file_stats['size']; $file_size = trim(`stat -c%s $_PLANET_FOLDER$file`); sleep(rand(2,5)); $file_mirror_size = _MIRROR_FILE_SIZE($_MIRROR.$file); if ($file_size==$file_mirror_size) { echo 'Adding: '.$file."\n"; fwrite($htaccess_handle, 'RewriteRule'."\t". '^('.$file_slashed.')$'."\t". 'http://ftp.heanet.ie/mirrors/openstreetmap.org/$1'."\t". '[R,L]'."\n"); } } } } closedir($dh); fclose($htaccess_handle); } } ?>