Uniquely identify one computer

后端 未结 9 864
渐次进展
渐次进展 2020-12-07 02:17

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 in

相关标签:
9条回答
  • 2020-12-07 02:34

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

    0 讨论(0)
  • 2020-12-07 02:34

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

    0 讨论(0)
  • 2020-12-07 02:41

    Change Firefox's user agent header to something that uniquely identifies that machine, you can then extract this string in PHP from $_SERVER['HTTP_USER_AGENT'].

    See How to edit the User Agent string

    0 讨论(0)
  • 2020-12-07 02:41

    How about ssl and client certificates?

    http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html#accesscontrol

    0 讨论(0)
  • 2020-12-07 02:43

    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

    0 讨论(0)
  • 2020-12-07 02:47

    You could set a cookie, or alternatively, you could modify the UserAgent header that your Firefox installation is using to something distinctive.

    To change the User Agent string, just enter about:config as an address in the address bar of FireFox, the location where you normally enter a URL (link). I recommend to preserve the original value, which you can get when you enter just about: in the address bar.

    Now press the right mouse button to get the context menu and select "String" from the menu entry "New". Enter the preference name "general.useragent.override", without the quotes. Next, enter the new User Agent value you want Mozilla Firefox to use. I added my name and a link to my web site to the original value. You can also pick one from the list of User Agent strings. Check the new value by entering about: in the address bar.

    You can retrieve this User-Agent string from $_SERVER['HTTP_USER_AGENT'] in php.

    0 讨论(0)
提交回复
热议问题