3

I want people to be able to vote on my site, but I don't like sites that forces registration to do this. So my question is, is the any way to vote up/down, save the votes in a database, and make sure a person can only vote once? Without using cookies, I feel like its too easy to just clear cookies and vote again.

Green_qaue
  • 3,561
  • 11
  • 47
  • 89

6 Answers6

6

Email "captcha" is always nice - in order to vote, user has to provide email address, you send a link to that email and calculate the vote only if user clicked on that link. One unique email can have only one vote.

Ondrej Svejdar
  • 21,349
  • 5
  • 54
  • 89
4

You could store their ip address in the database. But that would mean that people sharing one Internet connection would not be able to vote once one person has voted. Also people with dynamic IP address could vote multiple times.

So there is nothing that would work really well apart from making them register. But you could simplify the logging in process with e.g. Facbook SDK for JavaScript (https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.0). There are many others you can use in parallel (Facebook, Google, etc.). This way they would not have to manually register on your site. The down-side is that you require them to have a Facebook account. Some people also prefer not to tie their Facebook account to 3rd party sites (e.g. me).

Michal B.
  • 5,676
  • 6
  • 42
  • 70
  • Thanks, I suspected as much. Ill have to implement registration. Like you Im not a big fan of giving out my fb to 3rd parties, so will give a few different options. – Green_qaue Jun 19 '14 at 11:46
3

You can collect details indirectly such as Operating System, IP address, Browser, Pligins which are installed, All Version Numbers in that session and produce a Hash.

By this, you can accompolish a reasonable vote ONCE on website without authentication.

Earth
  • 3,477
  • 6
  • 37
  • 78
1

Your options are as follows:

  1. Read their IP address
  2. Cookies
  3. User Agent

However, the best bet is by far a login solution.

ionutioio
  • 218
  • 1
  • 6
1

the only way without cookies is that you stores values in database by their IP adress for their identification.

but it will also not work perfectly, because

1)user can use proxy.

2)people who shared a same internet connection have the same ip adress.

Govind Singh
  • 15,282
  • 14
  • 72
  • 106
0

Your options could be:

1- Save IP (note that IP is changed on DHCP, dialup connections and proxies)

2- OpenID as you see in stackoverflow.com (note that user can use multiple id on yahoo, facebook, ...)

3- send a link to email address (note that user may be use multiple email)

4- use cookies (note that user can delete cookies)

Babak.Abad
  • 2,839
  • 10
  • 40
  • 74