View Full Version : Capture IP Address on Submit

01-05-2004, 01:31 PM
I'm trying to figure out how to capture a user's IP address when they submit a form to purchase items on my website to help prevent fraud. I know there's a way to do this, but what is it? Also, is it even worth it?

01-05-2004, 02:43 PM
I think that javascript alone can not capture the IP. A server-side application will do the job (SSI, ASP, PHP, JAVA, JSP, C++, Pearl, and so on...)

See also this


01-05-2004, 03:45 PM
don't most people have their IP addresses assigned dynamically? Those that use Cable and DSL? If that is the case then capturing their IP address would not be helpful.

01-06-2004, 08:07 AM
Actuallty, my cable ip addy is static. I can change it at will, buty it remains static. Phone modems on the other hand tend to be dynamic.

Javascript by itself cannot get an IP, but using Java, Javascript can.
As well, using an Java Applet you could too.

I don't remember where I read this, but if you do a google search for 'javascript ip address' +'using java' you might get something helpful.
But like it has been said, server side scripting is much better at this sort of thing and much easier too. Not too mention javascript and java can be disabled.