Hello, I've developed a voting system that creates a cookie once the user votes on a certain record. I want to limit their votes to once per week. Is there a way to set the cookie so that it will expire on each monday morning of each week? If there is I can't figure out the calculations.
This is what I have so far:
setcookie("has_voted", 1, time() + 3600 * 24 * 7);
Of course this will just set the cookie to expire one week after it is created. I need it to specifically expire monday morning. Any ideas?