实施投票系统,无需注册 [英] Implementing a voting system without requiring registration

查看:187
本文介绍了实施投票系统,无需注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上实施投票系统,而不必强制他们创建帐户。

I'd like to implement a voting system on my site, without having to force them to create an account. They would ultimately be voting up/down a piece of content which has a unique ID.


  • 我知道我可以在表格中存储条目IP / ID,但如果有多个用户来自同一个IP,那该怎么办?

  • 有没有办法唯一标识访问者而不绑定他们的外部ip? li>
  • 如果创建了GUID,则将其存储在该计算机上的cookie中,以后可以在同一台计算机上检索相同的IP吗?不同的IP?

对这些问题的任何想法,或任何洞察更好的方法将非常感激。 b $ b

Any thoughts on these questions, or any insight to a better approach would be greatly appreciated.

推荐答案

是的,你可以使用一个cookie,并将到期日设置为未来;

Yes, you could use a cookie and set the expiration very far into the future; however, there is nothing stopping anyone from clearing their cache and voting again.

您最好的选择是使用cookie,不允许来自同一IP的投票15分钟的对方...没有注册,这是你能做的最好的。

Your best bet, is to use the cookie and don't allow votes from the same IP within 15 minutes of each other... without registration thats the best you can do.

这篇关于实施投票系统,无需注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆