You could try this:
//Very beginning of long processing code
print "Your job is being processed<BR>";
flush();
ob_flush();
//Do the processing
//print "Processed";
This would return a result like this:
When site is immedeatly accessed a "Job being processed" line will be seen. After a few seconds (Processed) will come up right after the first line.
But please note that if the processing takes more then ~30 seconds then the browser might stop loading. To keep the browser listening for the site, send a character once in a while to the browser.