PDA

View Full Version : User Integration


blueskyler
12-17-2011, 05:00 PM
I made a little vending machine script, and I was wondering if there is some way to make it so that users can only visit once per day. Right now it uses cookies, but people can just delete them, and I don't want ip logging because people on the same computer wouldn't be able to visit it. Is there any way to do this?

PokePets
12-18-2011, 02:04 AM
Make a new field, put yes in when the page loads.
With a cronjob you empty everyday the field :)

Hall of Famer
12-18-2011, 02:08 AM
umm you can create a table in your database that behaves somewhat similar to the prefix_voters. Whenever a user visits this page, a row is automatically inserted into this table recording his/her userid, username and date of visit. Then write your script to check if the current date is the same as the date stored in your table. If so, the user has apparently visited the page for more than once in a day. All you can do next is to generate an error message for the specific user should this happen.

blueskyler
12-19-2011, 02:26 PM
Then write your script to check if the current date is the same as the date stored in your table.
How would I do this?