Welcome to WebmasterWorld Guest from 50.17.117.221

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Loop every ten seconds

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

Junior Member

10+ Year Member

joined:Jan 23, 2004
posts:81
votes: 0


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)

Moderator

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

joined:Apr 25, 2002
posts:8137
votes: 95


You could sleep inside a loop

[us2.php.net...]

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 26, 2003
posts:1133
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 26, 2003
posts:1133
votes: 0


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

Moderator

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

joined:Apr 25, 2002
posts:8137
votes: 95


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)

Junior Member

10+ Year Member

joined:Apr 22, 2005
posts:185
votes: 0


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)

Junior Member

10+ Year Member

joined:Jan 23, 2004
posts:81
votes: 0


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