mem0ri Posted March 22, 2007 Share Posted March 22, 2007 I'm sure people are just gonna laugh at me...but...I'm wondering if there's even a way to run a persistent PHP page that counts ever tick on a timestamp...and when it reaches certain points makes a call to a MySQL database? Link to comment https://forums.phpfreaks.com/topic/43788-solved-php-based-timer-systemeven-possible/ Share on other sites More sharing options...
btherl Posted March 22, 2007 Share Posted March 22, 2007 Yes there is, but probably you should look into "cron" instead. cron can call a script at specific times throughout the day. What you described is commonly called a "daemon" .. it's not common to write one in php but it's certainly possible. Link to comment https://forums.phpfreaks.com/topic/43788-solved-php-based-timer-systemeven-possible/#findComment-212597 Share on other sites More sharing options...
mem0ri Posted March 22, 2007 Author Share Posted March 22, 2007 Thank you...I ended up taking a look at cron and my server 'crontabs' per your suggestion. I think my next query along this line needs to be...if I call a PHP page that includes the "CONSTANTS" page and change a constant...will that changed constant persist? I believe it should...I guess the best way is to try it out. Thank you. Link to comment https://forums.phpfreaks.com/topic/43788-solved-php-based-timer-systemeven-possible/#findComment-212604 Share on other sites More sharing options...
btherl Posted March 22, 2007 Share Posted March 22, 2007 I don't know what you mean by the "CONSTANTS" page. I'm also not sure what you mean by "call a PHP page" Can you show your code (if you have some). If you are using require() or include() to use a php file which defines some constants, then those constants will only change when the file is edited. Link to comment https://forums.phpfreaks.com/topic/43788-solved-php-based-timer-systemeven-possible/#findComment-212606 Share on other sites More sharing options...
mem0ri Posted March 22, 2007 Author Share Posted March 22, 2007 Yes, sorry...I was being vague...probably had to do with having been up and in front of code for about 20 hours straight. Anyway...I did mean altering a value from within a page that defines constants. Thank you for the answers...going to mark this topic solved. Link to comment https://forums.phpfreaks.com/topic/43788-solved-php-based-timer-systemeven-possible/#findComment-212751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.