Solved

Getting a client's IP address

Posted on 1999-01-14
2
136 Views
Last Modified: 2013-12-25
I am interested in identifying a client which activates a cgi/servlet on my server. I would like to use his IP address as the identifier. How can I read this identifier in my cgi/servlet? I know the cgi variables REMOTE_HOST and REMOTE_ADDR give me some information about the client, but it is not necessarily his exact IP. I think it's only his network IP. Is there something else?
0
Comment
Question by:ariefishler
2 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 50 total points
ID: 1830589
The IP address returned is the full, and only IP address, that you can get to. It is this address that the server will respond to when it sends data back to the client.

The problem is that if the client is behind a firewall or is using a caching proxy server then the IP address that you will see is the IP address of the proxy server. The real IP address is held by the proxy so that when you respond to it it will respond to the client.

If the client is not using a proxy the the IP address will be the IP address of the actual machine.

I am afraid there is no way around this as has been discussed and mentioned several times before in other questions.

As also stated the only ways in which a user can reasonably be recognised are.

1) To store a cookie which you can re-read on subsequent accesses.

2) Allow registered users through a password control mechanism and then track the user through the course of you site.

3) Implement the site via SSL and require a certificate. This is generally not an option at the present time as the use and understanding of certificates is so poor generally that you would  get no users to you site.

HTH
    Steve
0
 

Author Comment

by:ariefishler
ID: 1830590
Thanks....was quite quick !!!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now