deltajam_v Posted September 25, 2006 Share Posted September 25, 2006 Hi, I have a randomly created password that I would like to somehow automate to change everyday. However, I would like that password to stay the same for 24hrs and then change. Is there a way to automate this without creating a cron job? Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/ Share on other sites More sharing options...
deltajam_v Posted September 26, 2006 Author Share Posted September 26, 2006 I jsut want the password to stay the same for 24hrs and then be randomly generated to cover another 24hr period. Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-98989 Share on other sites More sharing options...
steveclondon Posted September 26, 2006 Share Posted September 26, 2006 if you want the script to run its self and generate the new code you need crontab Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-98990 Share on other sites More sharing options...
deltajam_v Posted September 26, 2006 Author Share Posted September 26, 2006 what about something like this ...1. Randomly generated password is created and written to a temp database field.2. User attempts to login and the script checks the password used to enter with the password stored in the DB.3. It also checks the date/time of the random pass, and verifies if its been a 24hrs or not4. If it has been more than 24hrs since the last pass was generated, it generates a new password and stores it in the DBmight this work instead of using crontab? Ps ... absolute newbie to crontab ... have no idea where I would start with that ...Thanks Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-99044 Share on other sites More sharing options...
Fehnris Posted September 27, 2006 Share Posted September 27, 2006 That would work although it wouldn't be that accurate in terms of having the password active for exactly 24hrs. You would have to make sure that, to keep the 24hrs time frame, someone would login after the 24hr period has elapsed. Would be fine for a high traffic website but could prove a problem for one with low traffic.To be honest, crontab is the way to go. It isnt to hard to set up once you know what your dealing with. Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-99431 Share on other sites More sharing options...
deltajam_v Posted September 28, 2006 Author Share Posted September 28, 2006 I have zero experience with crontab. My site is hosted with iPower ... so php & mySql. I always thought cron was a linux thing ... excuse my ignorance please .. Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-100409 Share on other sites More sharing options...
deltajam_v Posted September 28, 2006 Author Share Posted September 28, 2006 ??? Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-100513 Share on other sites More sharing options...
roopurt18 Posted September 28, 2006 Share Posted September 28, 2006 PHP and MySQL are what drive your website. They're installed on webhost computer which can be running any server OS. As long as the OS provides automated task scheduling, you can schedule your site to do anything.Try going to http://www.google.com and searching for:crontabcron jobsLook for the pages pointing back at wikipedia as a starting reference. Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-100540 Share on other sites More sharing options...
Fehnris Posted September 29, 2006 Share Posted September 29, 2006 Sorry for the slow response, cron jobs are usually something provided as part of your web host control panel. My webhost has cPanel which has an icon for Cron Jobs. Check with iPower to see whether and how they offer Cron Jobs. Quote Link to comment https://forums.phpfreaks.com/topic/21932-php-time/#findComment-100703 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.