Monkuar Posted January 24, 2012 Share Posted January 24, 2012 ok i have a lottery system very nice one choose 36 balls/etc 3 numbers must be exaxt, odds of winning is like 1:45920 lol prob is for the lottery to countdown and select the lottery, somone needs to be at the site to refresh the "DELETE FROM" query/etc/etc how would I go about making it so after the time is run down, what if no1 is viewing the lottery page? then the new lottery wont run, i need something refresh that page every other 1hour, cron job? Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/ Share on other sites More sharing options...
Pikachu2000 Posted January 24, 2012 Share Posted January 24, 2012 Can't you just have the script check for the last update time when it runs, and if it's been more than whatever your max time is, run the refresh routine? Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310826 Share on other sites More sharing options...
nine7ySix Posted January 25, 2012 Share Posted January 25, 2012 My understanding is that you want to run a Query without anyone being at the site and at certain intervals. You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically. I don't know your exact code but if your server is managed with cPanel, I think cron is possible. Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310858 Share on other sites More sharing options...
Monkuar Posted January 25, 2012 Author Share Posted January 25, 2012 Quote My understanding is that you want to run a Query without anyone being at the site and at certain intervals. You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically. I don't know your exact code but if your server is managed with cPanel, I think cron is possible. how hard is it do with debian linux 64bit? what i run also pikachu, the script alrdy does that.. but sum1's needs to view the lottery page for it run lol ! Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310867 Share on other sites More sharing options...
nine7ySix Posted January 25, 2012 Share Posted January 25, 2012 Quote Quote My understanding is that you want to run a Query without anyone being at the site and at certain intervals. You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically. I don't know your exact code but if your server is managed with cPanel, I think cron is possible. how hard is it do with debian linux 64bit? what i run also pikachu, the script alrdy does that.. but sum1's needs to view the lottery page for it run lol ! I'm not very familiar with Linux, but this article looks helpful. http://www.debian-administration.org/articles/56 Just know that .php files can be run with cron as well. Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310870 Share on other sites More sharing options...
Monkuar Posted January 25, 2012 Author Share Posted January 25, 2012 Quote Quote Quote My understanding is that you want to run a Query without anyone being at the site and at certain intervals. You could cron to do this. What is basically can do for you is at certain intervals, it will run PHP functions automatically. I don't know your exact code but if your server is managed with cPanel, I think cron is possible. how hard is it do with debian linux 64bit? what i run also pikachu, the script alrdy does that.. but sum1's needs to view the lottery page for it run lol ! I'm not very familiar with Linux, but this article looks helpful. http://www.debian-administration.org/articles/56 Just know that .php files can be run with cron as well. thank u for this Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310878 Share on other sites More sharing options...
Pikachu2000 Posted January 25, 2012 Share Posted January 25, 2012 Quote pikachu, the script alrdy does that.. but sum1's needs to view the lottery page for it run lol ! If nobody views the page for 8 hours, then why does it matter whether the numbers are generated every hour, or eight sets are generated at once? Link to comment https://forums.phpfreaks.com/topic/255707-lottery-system-help/#findComment-1310897 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.