Determine Client's Computer Name

后端 未结 7 666
情歌与酒
情歌与酒 2020-11-29 23:41

I am building an intranet site that will display different lists based on the computer name because different computers are in different areas, is there a way (within a cont

7条回答
  •  鱼传尺愫
    2020-11-30 00:30

    I think you are better off using one of these methods to tie a user to a location:

    • a cookie that is set once the user self-selects their location
    • having the user login to the site so that you can track them uniquely that way
    • remembering user by IP address

    There is no way of ensuring remote hostnames are unique. The same issue occurs with IP because of proxies, dynamic IP, etc., but I think it will be a little more reliable. Also, you can do geolocation by IP address.

提交回复
热议问题