voting-system

How does Youtube remember Likes?

旧城冷巷雨未停 提交于 2020-01-05 03:51:06
问题 So I'm wondering how sites like YouTube remember when a user has "Liked" a video and prevents them from liking it again. Similarly, how a site like Reddit remembers upvotes and downvotes and prevents a user from upvoting a piece of content they already upvoted. Is it as simple as a database table where the ID of the content is stored along with the ID of the user and their response? I feel like that would become a massively huge table. Is there something trickier going on? 回答1: I have a like

Best method to prevent gaming with anonymous voting

梦想的初衷 提交于 2019-12-21 03:42:07
问题 I am about to write a voting method for my site. I want a method to stop people voting for the same thing twice. So far my thoughts have been: Drop a cookie once the vote is complete (susceptible to multi browser gaming) Log IP address per vote (this will fail in proxy / corporate environments) Force logins My site is not account based as such, although it aggregates Twitter data, so there is scope for using Twitter OAuth as a means of identification. What existing systems exist and how do

Voting in MongoDB

China☆狼群 提交于 2019-12-18 13:20:04
问题 An odd number set is recommended. My doubt is as one goes down from an odd set, we have an even number set. The number of members fluctuate between even and odd when they go down one by one. We always don’t have odd member scenario. Can some one explain how MongoDB voting works? 回答1: The voting is done by a majority of voting members. Imagine a Replica Set with three (voting) members. Let's say that Node A is primary, and nodes B+C are secondaries. Node A goes down, so nodes B+C go to

Restrict User Activity Based on IP or on Cookie?

风格不统一 提交于 2019-12-13 13:23:41
问题 I am working on a PHP script that allows users to vote on certain items. Any user whether logged in or not can vote. Consider the following cases: If the user is logged in, I can log user's id, and can restrict voting on the same item if he tries to vote again. If the user is not logged in, I can log user's IP, and restrict voting on the same item, from the same IP. If it's the first case, there's no need to log the IP. Now, the second case is driving me nuts, sort of. I was wondering that it

Implementing A Ranking System

痴心易碎 提交于 2019-12-11 10:17:59
问题 I've seen several question on how to secure and prevent abuse of ranking systems (like staring movies, products, etc) but nothing on actually implementing it. To simplify this question, security is not a concern to me, the people accessing this system are all trusted, and abuse of the ranking system if it were to happen is trivial and easier to revert than cause. Anyways, I'm curious how to store the votes. One thought is to have a votes table, that logs each vote, and then either immediately

PHP/MYSQL only allowing one vote per member?

北城以北 提交于 2019-12-06 08:33:24
问题 ive been giving the task at work of setting up an awards voting system, I dont know too much about php and mysql. But i know more about this than anyone else here, and my boss in on holiday. But I've been reusing the code, that had previously been left on our system and adapting it for this year. Basically the voting system works fine, and I've set up new tables in mysql to capture the data. I've found one fairly large flaw in the existing code though and am not sure how to modify it.

Prevent double voting

旧街凉风 提交于 2019-12-04 23:39:21
问题 I'm creating a web application where users will vote for some candidates by clicking thumbs up or thumbs down, and these users won't have any account on the site. What is the best technique to use? Is it necessary to use captcha for more protection from spam? Vote counts are expected to be millions, and the subject is not very critical as long as I get 95% accuracy that would be fine. Thanks. 回答1: You can combine these two methods: Add a cookie to prevent multiple votes from the same machine

Voting algorithm: how to calculate rank?

纵然是瞬间 提交于 2019-12-04 23:11:58
问题 I am trying to figure our a way to calculate rank. Right now it simply takes ratio of wins / losses of each individual entry, so e.g. one won 99 times out of a 100, it has 99% winning rank. BUT if an entry won 1 out of total 1 votes, it will have a 100% winning rank, but definitely it can't be higher that of the one that won 99 times. What would be a better way to do this? 回答1: Depending on how complicated you want to make it, the Elo system chess uses (or something similar) may be what you

PHP/MYSQL only allowing one vote per member?

孤街醉人 提交于 2019-12-04 13:52:07
ive been giving the task at work of setting up an awards voting system, I dont know too much about php and mysql. But i know more about this than anyone else here, and my boss in on holiday. But I've been reusing the code, that had previously been left on our system and adapting it for this year. Basically the voting system works fine, and I've set up new tables in mysql to capture the data. I've found one fairly large flaw in the existing code though and am not sure how to modify it. Basically the code allows people to vote as many times as they want at the moment. I want to restrict it to

How to restrict votes per day by IP in Php+Mysql voting?

∥☆過路亽.° 提交于 2019-12-04 06:05:00
问题 Hello I have this voting script attached it counts votes by IP address. Please how can I create a kind of time session on the IP addresses. "say 5 votes a day per IP. Voter has to wait another 24 hours before voting again. I know there are kind of questions like this. I have tried few, but I just can't get it to work. Thanks. Update script; <?php include("config.php"); $ip=$_SERVER['REMOTE_ADDR']; $add_time = new DateTime(null, new DateTimeZone('Europe/London')); $time=$add_time->format('Y-m