唯一标识一台电脑 [英] Uniquely identify one computer
问题描述
有没有反正我可以设置一台特定的计算机,以识别自己的服务器,所以服务器知道什么时候从web应用程序访问那台机器?计算机在kiosk模式下运行firefox,所以插件或greasemonkey脚本是允许的...
您可以设置一个cookie。这将被客户记住,并作为每个请求的一部分传送到服务器。更多信息在这里: http://www.w3schools.com/PHP/php_cookies.asp
I work for a university, and i'm implementing a PHP web app that needs to have different behavior when it is visited from one certain computer. The problem i am running into is that from the webserver, using $_SERVER['REMOTE_ADDR'] and gethostbyaddr(), i can only identify the router that a computer is going through, and not a specific computername.
Is there anyway i can set that one specific computer to identify itself to the server so the server knows when the webapp is being accessed from that machine? The computer is running firefox in kiosk mode, so addons or greasemonkey scripts are allowed...
You can set a cookie. This will be remembered by the client and transmitted to the server as part of every request. More information here: http://www.w3schools.com/PHP/php_cookies.asp
这篇关于唯一标识一台电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!