Whoops this works for finding 250 links
total, but if you want 250 links per site you have to reset $links_found array. So, after this:
PHP Code:
if (!$n_links && $delay_message) {
print $delay_message;}
add this:
PHP Code:
unset($links_found);
$links_found = array();
Also, the site doesn't stay locked, just in my particular case in a glitch, and the <= should be changed to a < or you'll get 201 pages found.