IP地址还是最好的? [英] IP Address or which is best ?

查看:133
本文介绍了IP地址还是最好的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友:)我正在开发一个网站,在该网站中,我需要每个用户/系统的唯一ID.登录功能不可用.但是我仍然需要一个独特的价值.我打算使用"IP地址"选项,在该选项中它对于所有系统都是唯一的.这是个好方法吗?或帮助我获得正确的解决方案.



在此先谢谢您:)祝您有个美好的一天:)

Hi Friends :) I have developing a website in which I need an unique ID of each user/system. Login facility is not available. But still I need an unique value. I am planning to go with the IP Address option in which it will be unique for all the systems. is this a good way? or help me to get the correct solution.



Thanks in Advance :) Have an awesome day all :)

推荐答案

一个IP地址并非对于所有系统都是唯一的,并且假设同一台计算机正在运行也不是正确的每次访问您的网站时都使用相同的IP地址.

您的服务器必须生成一个ID,例如已经建议的GUID值.可以将其存储在客户端的Cookie中.下次该计算机访问时,您可以获取cookie值并查看它是哪台计算机,或者是否需要新的ID.
An IP Address is NOT unique to all systems nor is it correct to assume that the same machine is going to have the same IP address every time it visits your site.

Your server has to generate an ID, like a GUID value that has already been suggested. This can be stored on the client machine in a cookie. The next time that machine visits, you can get the cookie value and see which machine it is, or if it needs a new ID.


这篇关于IP地址还是最好的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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