Thank you for your reply guys.
Apart from increasing the time limit or splitting the amount of links to check is there anything else that can be done?
In general, what's the best way to reliably work with functions that take a long time to execute?
I have set set_time_limit inside the while loop and it seems to be working, ie. it reaches the "all done" echo outside of the while loop.
What I don't understand is that it runs the script, the browser window is empty, then it dumps the first 15 or so "site XYZ doesn't have the link" messages for the sites that don't have the reciprocal link any more, then the script keeps going and adds another few messages to the browser output, etc.
I thought that all of the script output (i.e. the echo messages) would happen AFTER the script has been executed, not WHILE it is being executed?
Corsa