PHP:允许用户评论和评分只有一次与他们的ip地址 [英] PHP : Allow user to comment and rate only once with their ip adress

查看:191
本文介绍了PHP:允许用户评论和评分只有一次与他们的ip地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上下文:我在做一个网站,用户可以搜索互联网没收,我想为每个互联网提供商制作一个5星评级系统和评论系统...但用户只能被评论和评价一次为每个提供商...我有艰难获得用户ip地址,然后把它在数据库中,当他们评论和评分...

Context : I'm making a website where users can search for internet forfeit and I want to make a 5 star rating system and a comment system for every internet provider... But the users are only allowed to comment and rate only one time for each provider... I have tough about getting the user ip adress, then put it in a database when they comment and rate...

问你是否有人知道我是如何做到这一点的?

So i'm asking if some people have clue or idea of how i can do that...

你们可以看到我在说什么: http://fournisseursquebec.com/Fournisseurs/Fido.php

You guys can see what i'm talking about here : http://fournisseursquebec.com/Fournisseurs/Fido.php

推荐答案

没有什么真正的方法可以确保用户只能在这种网站上做一次。 IP地址可以免费更改,并且许多人由他们的ISP提供动态IP地址,在设置的时间段后自动更改或可以通过重置路由器或调制解调器更改。可以创建新帐户,因此您不能依赖用户的登录详细信息或ID。 Cookie(包括Flash Cookie)可以删除。电话号码可以更改,地址确认可以花费昂贵的邮费。

There is no real way of ensuring users can only do something once in this kind of website. IP addresses can be altered for free and many people are given a dynamic IP address by their ISPs which either change automatically after a set period or can be changed by resetting the router or modem. New accounts can be created so you can't rely on a user's log in details or ID. Cookies, including Flash cookies can be deleted. Phone numbers can be changed and address confirmation can work out costly in postage. Multiple social media accounts can be created, so you can't rely on people logging in from those being unique.

您可以通过设置积分制度来阻止用户登录,而用户允许他们根据他们有多少分或者他们已经注册了多长时间来执行某些操作,甚至那时,特别是当审查网站时,没有什么你真正可以做的,以阻止人们创建多个帐户和评分自己支付或持有账户以满足时间限制。

You can dissuade it by setting up a points system where users are allowed to perform certain actions based on how many points they have or how long they've been registered on and even then, especially when it comes to review sites, there's nothing you can really do to stop people from creating multiple accounts and scoring themselves up or holding onto accounts to meet the time limitations.

这篇关于PHP:允许用户评论和评分只有一次与他们的ip地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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