Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client IP on Internal Network

Status
Not open for further replies.

mswilson16

Programmer
Nov 20, 2001
243
US
Hi all,

I have a 2000 domain, I have wrote a serious of html and asp pages which are all working fine, the only thing that I need, is on one of the pages to display the client IP address. I have tried using all the commands on the following page but none of which show the client address... they all show the server address.

I only need to display it on a page, so if someone can please help me out that would be great!

Thanks in advance

Mswilson
 
using real Java and Javascript, you do something like this:

<SCRIPT>
var ip = new java.net.InetAddress.getLocalHost();
var ipStr = new java.lang.String(ip);
document.writeln(ipStr.substring(ipStr.indexOf("/")+1));
</SCRIPT>


-DNG
 
I have tried this code, and all that it displays is the IP address of the server...
 
not sure what happened there... I put the last post to the first post...

when I try the second post... nothing is displayed on the page... thanks for all your help though DotNetGnat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top