IP address (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


kitty6 -> IP address (6/24/2009 8:08:44)

I would like to create a form with a text box that showed the that person's public IP address.

Does anyone know the code for that?

Thanks.




treetopsranch -> RE: IP address (6/24/2009 10:27:18)

Is THIS what you are looking for?




kitty6 -> RE: IP address (6/24/2009 21:39:15)

That is exactly what I'm looking for. The only thing is it calls for a shtm file type instead of htm. When I create the page test.shtm and try to submit the form, nothing happens. Does it have to do with the shtm vs htm?

Thanks.




treetopsranch -> RE: IP address (6/24/2009 23:33:21)

SHTM file is a HTM Document with SSI. Server Side Includes (SSI) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served.

You will need a web server capable of running SSI (most web servers do this by default). Check your host to make sure.

It should work.




BobbyDouglas -> RE: IP address (7/2/2009 2:26:02)

You can also do this using PHP and ASP.

Using PHP:

<?php echo $_SERVER["REMOTE_ADDR"]; ?>

Using ASP:

<% Response.Write Request.ServerVariables("REMOTE_ADDR") %>




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875