You are here: Re: How to I prevent a user from running a module twice (i.e. online voting) ? « PHP Programming Language « IT news, forums, messages
Re: How to I prevent a user from running a module twice (i.e. online voting) ?

Posted by Barry on 02/07/06 17:10

the simplest, unsecure way of doing it is to use cookies.
when a user votes, check if a cookie exist
if it does, he cannot vote
if it doesn't , he can vote
after the vote, write a cookie

problem is, the user can clear all cookies and vote again.
so, it all depends on how secure you need it to be.

Barry

d wrote:
> "Al Dykes" <adykes@panix.com> wrote in message
> news:ds86ci$8rk$1@panix5.panix.com...
>
>>I've got a voting script that's a little too simple. I can vote as as
>>many times as I can click on the link in my browser.
>>
>>I'n not trying to write an official voting system but I would like to
>>do something as simple as catching the user's IP address and
>>remembering it for a time interval. That has it's own problems, but
>>it would at least prevent double clicks.
>>
>>I can get the IP #, but how do I store it on a server? I can do a flat
>>file
>>or something.
>>
>>Any other suggestions or code are welcome.
>>
>>I'm new to PHP.
>>
>>Thanks.
>>
>
>
> Think how they do it in real life :) Make sure everyone who wants to vote
> has a username/password - simply ask for that before voting, and then you
> know if a user has already voted or not.
>
>
>>
>>
>>--
>>a d y k e s @ p a n i x . c o m
>>
>>Don't blame me. I voted for Gore.
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация