I need to allow users to a commit a certain action on my website once a day and I’d like this it reset at midnight of the users’ local timezone. What’s the best way to accomplish this with PHP?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Maybe you could use javascript to get the time on the browser and AJAX it to your PHP script. There’s no 100% reliable way to do this other than asking the user AFAIK.