Welcome to WebmasterWorld Guest from 174.129.151.95

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Loop every ten seconds

   
4:59 pm on Nov 6, 2005 (gmt 0)

10+ Year Member



Is it possible to get something to repeat every x number of seconds, like cron but i need it as a function of the actual script.
5:15 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You could sleep inside a loop

[us2.php.net...]

5:17 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use:

<html>
<head>
<meta http-equiv=Refresh content="10;url=index.php">

Or use javascript
Michal Cibor

5:18 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm thinking differently than ergo :)
5:30 pm on Nov 6, 2005 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



He said he needed it as part of the script, so I was assuming he did not want to reload a page every time. So I guess it depends on what he's trying to achieve, but one or the other of those should do it.
6:54 pm on Nov 6, 2005 (gmt 0)

10+ Year Member



zootreeves why do you not say us what is you are trying to do?
looks so weird :)
10:17 pm on Nov 6, 2005 (gmt 0)

10+ Year Member



What I was trying to do is have a function repeat itself every 10s - but all the code required in the script (e.g. without cron or a browser). The sleep() function will work great. thanks for all your help