thetoolman Posted July 11, 2012 Share Posted July 11, 2012 Hi there, I am trying to create a script which will allow users to click a link which will display a count and increase each time. However, the user can only ever click on the link once. What would be the best way to do this. Would I have to use some sort of session or cookie? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/265509-increase-count-but-limited-to-one-click/ Share on other sites More sharing options...
scootstah Posted July 11, 2012 Share Posted July 11, 2012 Not sessions or cookies - the user could clear them and recount. The "best" way would be to limit it to one per user, but that requires user registration. If you don't have user registration, the best you can do is by IP. But, there is no 100% reliable way to do it by IP since they are easily changed. Quote Link to comment https://forums.phpfreaks.com/topic/265509-increase-count-but-limited-to-one-click/#findComment-1360730 Share on other sites More sharing options...
thetoolman Posted July 11, 2012 Author Share Posted July 11, 2012 Hi, Thanks for the reply. I only need something basic, so I think the IP thing might work. How easily would IP's get changed - do they get changed automatically? Quote Link to comment https://forums.phpfreaks.com/topic/265509-increase-count-but-limited-to-one-click/#findComment-1360754 Share on other sites More sharing options...
scootstah Posted July 11, 2012 Share Posted July 11, 2012 Some people's IP changes frequently, like daily/weekly. But, it is pretty easy to tunnel through a proxy which would give you a different IP. Quote Link to comment https://forums.phpfreaks.com/topic/265509-increase-count-but-limited-to-one-click/#findComment-1360757 Share on other sites More sharing options...
Barand Posted July 11, 2012 Share Posted July 11, 2012 Conversely you could get 100's of people on a network, all sharing a common proxy address so if one voted none of the others could. Quote Link to comment https://forums.phpfreaks.com/topic/265509-increase-count-but-limited-to-one-click/#findComment-1360763 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.