无状态点赞效能

WBOY
Release: 2016-06-13 12:13:06
Original
1220 people have browsed it

无状态点赞功能
如题,最近被要求做一个微信公众号的评论点赞功能,用户可以随便评论,无状态,不记录用户的数据(包括ip,微信号);为了搞这个,特意跑到糗事百科看一下,发现人家的点赞都是必须先登录,然后破事就来了,这个微信公众号的评论点赞到底该怎么防止别人无限点,想到过记录用户的ip,用2张表,一张评论表,一张ip表,当想点第二次的时候,查询到该ip已经点赞过,就提示不能再点赞了;然后朋友就提示我说,这种方法防不了小人,如果人家真想搞你,还是可以继续点赞的,比如断流量,再连接流量,论坛里的大神们有没有什么好的建议,主要是无状态的
------解决思路----------------------
那應該不能做,用ip,cookies那些都是不準的。
最好還是公眾號獲取到當前用戶的信息的,例如usertoken,再判斷了。
------解决思路----------------------
 不能做。。。
------解决思路----------------------
还是要记录用户的信息的
------解决思路----------------------
必须要记录 1项啊, 不然怎么判断, ?
------解决思路----------------------
要防止刷点赞数,点赞肯定是要需要记录的。有一些页面实现了无登录就限制点赞数,其实应该是使用了微信公众号的功能。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!