Alex Rivera | Logout

How to detect the visitor's IP address using HTML?

Asked 2011-12-31T10:40:51.330
8

How can i detect the visitors IP Address using HTML for my website? I have a contactform.html and a formsent.html. And when formsent.html sends the contact info to my email i also want to see their IP Address!

Edit
Report

1 Answer

13

You can't do it through HTML. However, you can find the IP address of a visitor through PHP.

$ip=$_SERVER['REMOTE_ADDR'];
answered 2011-12-31T10:48:26.760

Your Answer