Image

Imagepaul_mann wrote in Imagephp

Delaying a script

I'm having a bit of a problem getting a script to delay for a few seconds before it redirects the user to a new page.

What I want is

- so someting
- display someting
- sleep(5); //The delay
- redirect($url);

what i'm getting is

- do something
- sleep(5); // The delay
- display something // which goes by too fast to read
- redirect($url);

is there someting about the sleep() function that makes it the first function in a script to be exercuted before anything else in its ennclosing function is?

Any help would be welcome - I'm running out of hair here

Pual