HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1253
Number of posts: 3360

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Client IP Address Posted by thoughts on 2 Jan 2001 at 12:50 AM
Hello everyone,

I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?

Thanks for your help.


Edit Report
Re: Client IP Address Posted by iDaZe on 2 Jan 2001 at 3:59 AM
: Hello everyone,
:
: I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
:
: Thanks for your help.
:

With JavaScript you can only get the IP from NetScape, cause IE has a little bit better protection (with cgi you can still get it). Anyway, here's the netscape way:

<script language="JavaScript">
localipinfo=java.net.InetAddress.getLocalHost();
ip=localipinfo.getHostAddress();

document.write("Your IP address is " +ip+ "<br>");
</script>

The problem is dat IE doesn't know the java object.


Edit Report
Re: Re: Client IP Address Posted by edo4fun on 10 Jan 2001 at 12:18 PM
: : Hello everyone,
: :
: : I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
: :
: : Thanks for your help.
: :
:
: With JavaScript you can only get the IP from NetScape, cause IE has a little bit better protection (with cgi you can still get it). Anyway, here's the netscape way:
:
: <script language="JavaScript">
: localipinfo=java.net.InetAddress.getLocalHost();
: ip=localipinfo.getHostAddress();
:
: document.write("Your IP address is " +ip+ "");
: </script>
:
: The problem is dat IE doesn't know the java object.

i supose the code is good ....
but why don't you want it in cgi ?
almost all freeservers bravenet etc have a cgi bin .
and a paid server must actually have a cgi otherwise he haven't clients
their is one very large hd etc detector on astalavista.com look in your stats (some thing like that look a bit around)

regards
ed

:



Edit Report
Re: Re: Client IP Address Posted by jeremy on 5 Feb 2001 at 6:15 PM
: : : Hello everyone,
: : :
: : : I want my webpage to find and display the client's IP address for them. Is there a way to use non-cgi, non-asp programming to do this? Is there an HTML or JavaScript way, that would work for IE and Netscape?
: : :
: : : Thanks for your help.
: : :
: :
Do you have server side includes or SSI ability on your host. There is a very simple command that works through ssi that you can paste in your html code to display the users ip. I am quite sure it works with both netscape and internet explorer.


<!--#echo var="REMOTE_ADDR" -->

Have fun



Report
Re: Re: Client IP Address Posted by ruchi12 on 21 Aug 2012 at 5:39 AM
Hi visit ip-details.com here they provide HTML code which help to identify the ip address of the client who visited your web page .they also provide code that provide an ip search for your web site users .I hope it will be helpful to you.......



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.