?
Solved

NEED HELP FOR REMOTE IP

Posted on 1998-01-09
4
Medium Priority
?
249 Views
Last Modified: 2008-03-10
I'm a web page constructor and I work with HTML and JavaScript.  I want to know how you make the IP address of the visitor written on the web page.  Please help.  Thanks.
0
Comment
Question by:appletman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
kollegov earned 200 total points
ID: 1277400
You can't do it with JavaScript but you can do it with JavaApplet.

You can try calling java methods from script:
document.writeln(java.net.InetAddress.getLocalHost());
But you risking to get Uncought Java Exception error
if browser can't get user's IP for some reasons.
In addition this do not work with MIE, only Netscape.

Applet will work in any browser. MIE3+ Netscape3+
Some examples of applets:
http://www.gold.com.br/~emaciel/ipdetector/
http://www.fc.net/~bmartin/User/User.html

I'm sure you will be able to find more if you want...





0
 

Author Comment

by:appletman
ID: 1277401
Thanx
0
 

Author Comment

by:appletman
ID: 1277402
Thanx.  But I go to some sites using Internet Explorer, and the IP address shows up in plain text not in an applet.
0
 
LVL 10

Expert Comment

by:kollegov
ID: 1277403
I'm not sure about MIE4 but MIE3, definitly will give errors on
attempts to call java methods. Yes it can be done
with JavaScript as I mentioned above but with
risk of client side javaScript errors.
Most od sites use CGI to place IP in document
if you have ability to use Server-side include CGIs
it can be done easy.
<!--#echo var="REMOTE_HOST"--> for hostname
<!--#echo var="REMOTE_ADDR"--> for IP



0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question