Forum Moderators: open
So, my question is this:
"How can I retrieve the IP Address from the browser requesting the page?" - Knowing that I am not a guru by any means, I'm sure this isn't all that tough.
All I will do is set a declared variable to that value, then process the information as needed. But how do I acquire it?
Any help, as always, is much appreciated! Thanks!
~Eric
<table BORDER="1">
<th COLSPAN="2">ServerVariables</th>
<%
Dim var
For Each var in Request.ServerVariables
Call Response.Write("<TR>")
Call Response.Write("<TD><B>" & var & "</B>:</TD>")
Call Response.Write("<TD>" & Request.ServerVariables(var) _
& "</TD>")
Call Response.Write("</TR>")
Next
%>
</table>
1) "REMOTE_HOST" willl return the name of the host machine if your server is set up to perform reverse DNS lookup when the site is accessed.
2) REMOTE_HOST defaults to the value of REMOTE_ADDR if no hostname information is available. Therefore you will achieve a performance gain using the latter variable (admittedly a very small one, but it all helps, especially as the site gets busier :))