$besttt) { $bestfile = $file; $besttt = $res['mtime']; } } } closedir($handle); Header( "HTTP/1.1 307 Temporary Redirect" ); Header( "Location: http://www.mandible-games.com/release/" . $bestfile ); ?>