Uniquely identify one computer

2019-01-15 19:06发布

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...

标签: php firefox
9条回答
Rolldiameter
2楼-- · 2019-01-15 19:40
Anthone
3楼-- · 2019-01-15 19:53

Don't you have a SessionID ? Your sessionID should be unique enough to identify a computer.

查看更多
狗以群分
4楼-- · 2019-01-15 19:55

Why not implement an authentication system and place those users who need the special functionality into a special group?

查看更多
等我变得足够好
5楼-- · 2019-01-15 19:55

Im sure you got a very good answer but if you are looking for solution that uniquely identifies the COMPUTER rather than the BROWSER then look in to FLASH COOKIES a.k.a FLASH SHARED OBJECTS.

Theses are more powerful and can be used to store data up to 100KB and remains the same across all browsers that has flash, so it is better solution to uniquely identifying a user

查看更多
我只想做你的唯一
6楼-- · 2019-01-15 19:59

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

查看更多
冷血范
7楼-- · 2019-01-15 20:04

Try this.

$something=$_SERVER['HTTP_USER_AGENT'];

To uniquely identify user check $something matches your own.(which is on your php code). if yes then proceed access.

查看更多
登录 后发表回答