Forum Moderators: coopster

Message Too Old, No Replies

Waiting a few seconds in php

         

turbohost

7:51 pm on Dec 16, 2004 (gmt 0)

10+ Year Member



Hi Guys,

How can I tell a PHPscript to wait for a few seconds before going to the next step?

Turbo

jezra

8:19 pm on Dec 16, 2004 (gmt 0)

10+ Year Member



I haven't tested this but, if you are on a *nix machine, you might want to try

//some code
$num_seconds=3;
$result = shell_exec("sleep $num_seconds");
//the rest of your code

I don't know of a similar command on a win machine.

I hope this helps

Slade

8:24 pm on Dec 16, 2004 (gmt 0)

10+ Year Member



PHP has it's own builtin sleep function.

[php.net...]

turbohost

8:33 pm on Dec 16, 2004 (gmt 0)

10+ Year Member



It works fine, thx a lot!