Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-22-2007, 03:10 AM #1
- Join Date
- Jun 2006
- Thanked 0 Times in 0 Posts
Automated System (probably with a bot)
I want to make an automated system that checks itself every day at like 1 in the morning. It will go through all the accounts in my database and check the expiration date on each one, and like if there is 7 days left, send an email, 1 day left send a different email, etc. I know how to right a PHP script for this, but I don't want to have to have anyone browse that page in order for it to work, I want it to be self-sufficient. I think it would be best to make this a secure page with a encrypted login and I would need to run a bot of some sort that would access that page and would put the password in and run the script. This is a totally different environment for me, so I'm unsure as to what the solution would be. Does anyone know of a bot that does this already? What language does this bot need to be in? Do I need to code some sort of software or an application using Java or something? Input is needed! Thanks in advance!
02-22-2007, 07:26 AM #2
- Join Date
- May 2002
- Perth Australia
- Thanked 92 Times in 90 Posts
you just need to write a script in the language of your choice & run it automatically from cron, cron is like the task scheduler on windows and you can set it to run at set intervals, the cron script would call your (e.g.) PHP script as a cgi....
php -q -f /home/user/dbcheck.php &2>1
the added advantage there is that no-one else can run your script from a browser etc.
All this depends of course on your host supporting cron jobs, but almost all do, if yours does not ? then get another host
MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)