新网站的提示 [英] Tips for new website

查看:63
本文介绍了新网站的提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个静态网站,如视频库和喜欢不喜欢系统,无需用户注册或登录。我想我可以在所有帖子上获得用户IP地址。如果您的用户喜欢在db上的后用户ip商店并隐藏喜欢按钮和显示不喜欢按钮。如果用户点击不喜欢按钮ip删除帖子。



我尝试过:



请给我一些想法或提示

i want to create a static website like video gallery and like dislike system without user sign up or sign in.i think i can get user ip address on all post.if your user likes on post user ip store in db and hide like button and show dislike button.and if user click on dislike button ip remove on post.

What I have tried:

Give me some idea or tips please

推荐答案

使用IP地址来唯一识别用户是一个不好的主意 - 主要是因为它不起作用!

您的网站读取的IP地址不是唯一用户的IP地址,而是他连接到互联网的点的IP地址 - 路由器或等效物。因此,如果您在同一家公司中有一千个用户通过公司互联网连接,那么他们将拥有相同的IP地址!

相反,IP不需要ID任何用户即使他是建筑物中唯一的用户 - 大多数标准ISP连接都使用动态地址系统,当路由器连接到系统时,IP地址取自可用地址的池,因此单个用户可以使用每次连接到系统时都会有不同的地址。

如果你不想让他们登录,那么考虑在他们的系统上使用cookie来识别它们 - 它至少比它们好一点IP地址!
Using IP addresses to uniquely identify users is a poor idea - mostly because it doesn't work!
The IP address your site reads is not that of a unique user, it's the IP address of the point at which he connects to the internet - the router or equivalent. So if you have a thousand users in the same company who all connect via the company internet, then they will all have the same IP address!
And conversely, the IP doesn't have to ID any user, even if he is the only user in the building - most standard ISP connections use a dynamic address system, where the IP address is taken from a "pool" of available addresses when the router connects to the system, so a single user may use a different address each time they connect to the system.
If you don't want to make them log in, then consider using a cookie on their system to id them - it's at least a little better than the IP address!


这篇关于新网站的提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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