devxlogo

Hidden IP Address

Hidden IP Address

One of the easiest ways to grab an IP address is to use request.servervariables(“REMOTE_ADDR”) and then store the value as a hidden field in your form. When the user submits the form, you can write the field containing the IP address directly into your database along with the other fields. Here’s some sample code:

 
Name: ID: ">
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist