homepage Welcome to WebmasterWorld Guest from 54.205.106.111
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Loop every ten seconds
zootreeves




msg:1305916
 4:59 pm on Nov 6, 2005 (gmt 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.

 

ergophobe




msg:1305917
 5:15 pm on Nov 6, 2005 (gmt 0)

You could sleep inside a loop

[us2.php.net...]

mcibor




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

You can use:

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

Or use javascript
Michal Cibor

mcibor




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

I'm thinking differently than ergo :)

ergophobe




msg:1305920
 5:30 pm on Nov 6, 2005 (gmt 0)

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.

NomikOS




msg:1305921
 6:54 pm on Nov 6, 2005 (gmt 0)

zootreeves why do you not say us what is you are trying to do?
looks so weird :)

zootreeves




msg:1305922
 10:17 pm on Nov 6, 2005 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved