Is there a set time out equivalent in php?

Viewed 11444

Is there a PHP equivalent to setting timeouts in JavaScript?

In JavaScript you can execute code after certain time has elapsed using the set time out function.

Would it be possible to do this in PHP?

5 Answers

if ($currenturl != $urlto) exit( wp_redirect( $urlto ) );

You can replace above two line with below code inside your function

if ($currenturl != $urlto)
header( "refresh:10;url=$urlto" );

Related