问题描述
我正在开发一个小型Web应用程序,该应用程序需要一个使用php进行大学活动的在线投票系统.我正在获取IP地址并将其存储在数据库中,以防止同一用户重复投票.但是后来我想起我的大学使用代理服务器,因此获取IP地址是没有用的.我尝试使用javascript访问和存储客户端的Mac地址..我尝试了一些在Internet上找到的示例..但没有一个起作用.你们能建议我替代我如何获得想要的结果吗?
I am developing a small web app where it needs an online voting system using php for my college event. I was obtaining IP Address and storing it in database to prevent repeated voting from same user. But then I remembered that my college uses a proxy server so obtaining IP address is useless.I tried accessing and storing Mac Address of the client using javascript.. I tried out a few examples that i found on the internet.. but none of them worked.Can you guys suggest me an alternative to how can I get the results I want??
衷心感谢您的帮助.
关于,阿尤什·什雷斯塔(Aayush Shrestha)尼泊尔
Regards,Aayush ShresthaNepal
推荐答案
让他们输入他们的电子邮件地址,并发送指向他们的电子邮件的链接,以便他们进行投票.该链接应包含其电子邮件的一些哈希值,您必须检查他们是否已投票.
Have them enter their email addresses and send a link to their email that allows them to vote. The link should include some hash of their email and you would have to check if they have already voted or not.
我意识到一个学生可以输入多个电子邮件地址并进行多次投票,但是一个学生实际上有多少电子邮件?他们会花多少时间做类似的事情?
I realize that a student could enter multiple email addresses and vote multiple times, but how many emails does a student really have? And how much time would they spend doing something like that?
我猜您无法通过您的大学访问任何形式的身份验证系统,因此这可能是最好的方法.
I'm guessing you don't have access to any sort of authentication system through your college, so this is probably the best way.
另一个想法是使用Facebook身份验证(请参阅: http://developers.facebook.com/docs /authentication/).缺点是您必须假设所有选民都有Facebook帐户.
Another idea is to use Facebook authentication (see: http://developers.facebook.com/docs/authentication/). The downside is that you have to assume that all voters have facebook accounts.
这篇关于在线投票申请.如何避免来自同一用户的重复投票的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!