If your processing can be done on the Client machine, you can use a clientside application; for example a Java applet.For processing on the server, one trick that works well for Clients running an X server (and far more efficient than a JAVA solution) is: if ( fork() ) else NOTE: THEIR_DISPLAY is not necessarily the same as REMOTE_HOST or REMOTE_ADDR.This requires care, and can lead to unexpected results.
You can get some limited information from the environment variables passed to you by the browser. Techniques such as "[email protected]" are not reliable, are widely disliked, and generally serve only to introduce long delays in your CGI.
Relatively few of these are guaranteed to be available, and some may be misleading. Better - as well as more polite - just to ask your users to fill in a form.
Your web server may also not perform a reverse lookup on incoming connections, in which case REMOTE_HOST will contain the IP address even if it has a corresponding IP name.
In the second case, you can do a reverse lookup yourself in your script, but this is expensive and should probably be avoided unless absolutely necessary.
If it works with *your* browser, you should upgrade!