开发者

Website - nearly same clients, different informations

开发者 https://www.devze.com 2023-02-10 10:55 出处:网络
There are two (or more) computers on LAN with internet access. They have the开发者_运维问答 same:

There are two (or more) computers on LAN with internet access.

They have the开发者_运维问答 same:

  • operating system,
  • browser and browser version,
  • user name.

    They are visiting my webpage which can use js and php to retrive informations.

    Is there any way I can find differences between these clients with retrived information? Which informations are different?


    Set a (random valued) cookie or a session.

    The two machines will have unique identities.


    Their IP addresses would be different, unless they're using a proxy and/or NAT firewall. That information can be retrieved trivially via $_SERVER['REMOTE_ADDR']. There may an X-Forwarded-For header that some proxies might put in place, revealing the internal address, but it's not guaranteed to be there, and definitely not guaranteed to be reliable.

    There's a few client-side tricks you can use to get machine's local address, but again, if they're behind a NAT firewall and/or proxy, there's no guaranteed that both machines aren't on two seperate networks and both coincidentally have the same private IP address.

  • 0

    精彩评论

    暂无评论...
    验证码 换一张
    取 消

    关注公众号