Ask Felgall Home page
Your host:
Stephen Chapman
Stephen Chapman

Obtaining a Visitor's IP Address

Question: How we can track the user IP address of the person who using Internet explorer and add the ip value into text input field?
anonymous

Answer: This can't be done with Javascript as Javascript does not have access to the internet and knows nothing about IP addresses (Javascript is downloaded to your visitor's computer and runs there).

To obtain the IP address of your visitor requires a server side script eg. ASP, PHP, JSP, or PERL. These can obtain the IP address from an environment variable called REMOTE_ADDR.

Related Articles

go to top

FaceBook Follow
Twitter Follow
Donate
Copyright © Felgall Pty Ltd