Aero77 Posted February 27, 2015 Share Posted February 27, 2015 What would be the best way to collect votes for my toplist ? Im not so good with php, but gonna try anyway. I just want to collect votes and temporary restrict the IP from voting over again for a limited time. (like a day or so) Should I have one record in the database for each vote ? Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/ Share on other sites More sharing options...
Psycho Posted February 27, 2015 Share Posted February 27, 2015 Using IPs is never a good way to determine unique users. Many users can be using the same public IP address (behind a router), so you would be blocking users because one other user made a vote. Conversely, if someone want to vote multiple times it can be pretty simple to get their IP changed. The best method is if you have login to ensure the same user cannot vote twice. Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1506992 Share on other sites More sharing options...
Aero77 Posted February 27, 2015 Author Share Posted February 27, 2015 sounds better, but Im afraid there wont be too much votes if you have to login or register. I dont really care if the same user votes over again, but I dont want them to sit there with the F5 key and gather 60 votes per min Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1506996 Share on other sites More sharing options...
ginerjm Posted February 27, 2015 Share Posted February 27, 2015 F5 refresh key? You could stop that with a session var after the first vote is logged in a session. Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1506997 Share on other sites More sharing options...
Aero77 Posted February 27, 2015 Author Share Posted February 27, 2015 would they not still be able just to access the link over again ? I will collect the votes from a link/code they put on their own websites Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1507003 Share on other sites More sharing options...
ginerjm Posted February 27, 2015 Share Posted February 27, 2015 As I understand sessions, the session remains open until the browser is closed, so a retyping of the url would not work. Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1507008 Share on other sites More sharing options...
Aero77 Posted February 28, 2015 Author Share Posted February 28, 2015 I know, but they close the browser and opens it again, but its not really that important. I want to reset the toplist every month or so. I just wanna find out how they count the clicks in the and out and such Link to comment https://forums.phpfreaks.com/topic/294948-php-toplist/#findComment-1507011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.