How can I use Javascript to identify the client?

I have a problem where I cannot identify visitors to my intranet page because their browser is configured to use a proxy, even for a local intranet. I always see proxy IP and no other client details. The SOE that my company uses has a proxy already configured for Firefox and Internet Explorer, and I cannot ask them to reconfigure their browser because it is rather difficult. I tried to use PHP $ _SERVER ['REMOTE_ADDR'] and also one of them is $ HTTP_SERVER_VARS ['HTTP_X_FORWARD_FOR']. In fact, I wrote a page that lists the $ _SERVER and $ HTTP_SERVER_VARS arrays and nothing was reported about the actual client connection. This is why I think it needs to be done on the client side.

I'm not looking for a safe solution because this is just a simple page, so I was hoping I could use Javascript or something similar to find something revealing about the client and send it to my intranet page as a GET variable. to compare statistics. Needless to say, most visitors are proxies! :)

I also want to prevent users from being logged in if possible.

+1


source to share


2 answers


You can use a cookie with a random unique ID set on the first login and then be used for identification. Can be done in either JavaScript or PHP.



+5


source


I'm pretty sure there is no one-size-fits-all way to do this, otherwise the whole concept of anonymous proxies will go downstairs :)



I would suggest contacting your IT department to set up a proxy to fill in the HTTP-X-FORWARD-FOR, REMOTE-ADDR, or other identifying header.

+1


source







All Articles