Hi, I am trying to develop a simple PHP application with quite a 2 hour free trial for my application. I need the account to deactivate after 2 hour. Don’t know how to do and I also want multiple IP protection on single user Thanks in Advance
This is how I would do it. 1. in the database have a status column (0= not activated, 1=active, 2= deactivated ) or similar. 2. in the database have a column where you not the date and time of activation. Then on every page load check the users activation time and if it is older than 2 hours set the status to deactivated Upon login you also need to check that status and if it is deactivated you need to show them a custom error message or redirect them to a page where they can read more about your product. as for duplicate IP that can be tricky as there are still people on ISP's that change the IP on the fly. So all those users would be kicked out.
You could also set up a cron job to run at specific intervals. This would keep you from having to query the database on every single page load and possibly updating multiple records, which will bog down your server and sacrifice run time. I can help you with all of this if you are still in need, just shoot me a PM. Thanks, Robert