Hi Ice_Metal,
Thanks for the feedback.
I'm not sure I used the right technical words but what I mean by "redirect" is this.
So it seems that the script stops here and cannot go to the next stage and do further processing. I will try to use the PHP header() function and see if I have more success with that one.
As far as the javascript part is concerned, this is yet another problem because I don't know if either lynx or wget can execute javascript. Actually, the task of the javascipt in this script is to refresh/reload the page - so I don't think the sleep()/unsleep() functions applies here.
If you find anything new, please do post it here. I think it could interest a lot of people to know how to do this because processing in stages is a way to 'counter' the problem of maximum execution time on servers.