Solved

Remote IP address

Posted on 1998-11-01
8
235 Views
Last Modified: 2013-12-25
How do you get a visitors IP address without using ASP.

Is there an HTML solution?

What I want to do is get the remote IP, save it in a hidden field and have the existing form submit the data to an existing script for sstorage.

If there is no HTML solution I'll be happy with a freely available CGI script.
0
Comment
Question by:innovate
[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
  • 5
  • 3
8 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1856062
I don't think there is a HTML solution. As far as I know the only client-side solitions are java and ActiveX.

The easiest server-side solution is SSI (server side include) but it is not supported by alle servers.

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

So:

<input type="hidden" name="ip" value="<!--#echo var="REMOTE_ADDR"-->">

other server side solutions are CGI/ASP. They all will ask for "REMOTE_ADDR", how they do it depends a bit on the language.

==============
ASP:

<input type="hidden" name="ip" value="<%=Request.Servervariables("REMOTE_ADDR")%>">




0
 
LVL 2

Author Comment

by:innovate
ID: 1856063
Looks good,  I'll give it a test.  The server is IIS4 so it should work.  I'll reply in a short while with your points.
0
 
LVL 2

Author Comment

by:innovate
ID: 1856064
mmm? didn't work.  Tried it using a text field and it just showed

[<!--#echo var=       ]">

where the square brackets are the sides of the text box.  Client side Java would do if you have a snippet of code.

0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 28

Expert Comment

by:sybe
ID: 1856065
on IIS4 you'll have to rename the file from .htm to .shtm in order to enable SSI
0
 
LVL 28

Expert Comment

by:sybe
ID: 1856066
And I am afraid the IIS4 does not know the SSI command "echo".

0
 
LVL 28

Expert Comment

by:sybe
ID: 1856067
No, In tested it with ASP, that does NOT work, but in .stm, the echo stuff works !
0
 
LVL 28

Expert Comment

by:sybe
ID: 1856068
So:

Rename the file from .htm(l) to .stm(l) and the SSI code will work fine.
0
 
LVL 2

Author Comment

by:innovate
ID: 1856069
Thanks sybe.

Worked fine on my NT4 machine but when I uploaded to the web (also an NT4 machine) it just returns an empty text box.  
I've awarded the points anyway because your answer is correct.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
what are list of ebay api errors 1 35
CSS: How to get responsive tables to not be so spread out on desktop 5 47
MediaWiki - Move a site 4 32
How to build a web site 17 57
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

726 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