Jump to content

How to prevent multiple voting/rating(hotornot clone)???


sinisake

Recommended Posts

Hi,

my question is more about DB/script optimization, because script could(possibly!) work with big number of users/votes/ratings...

My client said that cookies will be fine.

(I know that other ways - sessions and IP tracking have their disadvantages too...)

 

To be more clear, everyone can vote, there is no registration/login...

 

And, now i would like your suggestions about implementing of multiple voting prevention...

What you would do? I have several solutions/suggestions:

 

1) all data stored in cookie(unique id and id's of pictures which has been rated, script should pull off picture id's from cookie)

 

2) cookie+DB -1.way

All ratings/votes from same user in one field/one row!

TABLE STRUCTURE:

id,unique_id,picture_ids(separated by commas)

for example

1, 1uu2145u55, 1,2,4,5,6

 

This way is good when there is no too many votes, but you can imagine what will be with number increasing...

(i am using explode() function to get rated images id's)

 

3) cookie+DB -2.way

 

EVERY RATING - ONE ROW IN DB

 

same db structure, but:

id,unique_id,picture_ids(separated by commas)

for example:

1, 1uu2145u55, 1

1, 1uu2145u55, 2

1, 1uu2145u55, 3

 

Sorry for my English, i hope that you understand what i tried to say.

 

So, what you would suggest?Is there any other(better) way?

Thanks in advance!

Link to comment
Share on other sites

If your client said cookies are okay, just use them.

 

If anything store an IP address and a question/picture id but then you'll have to worry about Dial Up users who share an IP address.

 

SampleTable:

 

IP,voteon

127.0.0.1,52

127.0.0.1,55

 

Then you could simply SELECT * FROM tablename WHERE ip='127.0.0.1' AND voteon='52' then run mysql_num_rows, if 0 is returned they haven't voted.

Link to comment
Share on other sites

capture and store their IPs - depending on how determined they might be to re-vote. It should be enough for most voting purposes, but if you really want to restrict voting, you could require registration. There are ways around that too - it's just a matter of how many people you think would bother to re-vote.

Link to comment
Share on other sites

Thanks people,

but my biggest concern here isn't fact that votes/ratings can be fake.

 

I know that there is no possibility to get real user identification and to prevent malicious users to do they job, without registering(but, as i said, there is no registration/login, everyone can vote).

 

I am concerned about script/server(s) possible overloading with some of mentioned ways of storing/retrieving data...

 

@MattDunbar,

yes, even i am not using static ip, and also, proxies are here, so... :(

Your suggested way is actually 3. way i described.

 

My biggest concern here is number of rows which could be (possibly) created, and how many mySQL db can stand.

Performances of scripts, if number of users/raters be dramatically increased?  ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.