Forum Moderators: open

Message Too Old, No Replies

Looking for a code to show

         

charbello

2:33 am on Apr 9, 2005 (gmt 0)

10+ Year Member



Hello
I don't know if I post in the right forum .
I'm looking for a code that will show my visitor their ip address, like what is my ip .
Thanks

ogletree

3:42 am on Apr 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As far as I know javascript can't do it. You need a server side language like PHP, ASP or just SSI. It is very easy to do in those. Which one you want it in. What you are looking for is REMOTE_ADDR. You can search for that and find all kinds of info.

Rambo Tribble

4:02 am on Apr 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the local IP address isn't exposed at the client. You have to read that at a server.

charbello

3:13 am on Apr 12, 2005 (gmt 0)

10+ Year Member



I got it from another website/ Thanks

Moby_Dim

6:36 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Javascript + java ;) Try this :

myhost=java.net.InetAddress.getLocalHost();
ip=myhost.getHostAddress();
document.write("Your IP is : "+ip);

Should work on the most machines.