[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

getting host's IP in IE

In nescape to get visitor Ip, I use:

baseAddress = java.net.InetAddress.getLocalHost()
ip = baseAddress.getHostAddress()

How can I get the same info for IE browser?
0
kako
Asked:
kako
  • 2
1 Solution
 
bsandemanCommented:
Hi Kako,
I don't know if you want to do this client-side or server-side, but I only know of a method using ASP code to output a server variable.  see the following ASP code:-

<% @ LANGUAGE="Javascript" %>

<html>
<head>

</head>
<body>
IP Address<br>
<hr>
<%
Response.write(Request.ServerVariables("REMOTE_HOST"));
%>

</body>
</html>

hope this helps
cheers
Bruce
0
 
kakoAuthor Commented:
I have a poll on my site
and want to allow only the peoples
from my domain access this poll.
so I have to check their IP.
Thanks

0
 
bsandemanCommented:
Glad to be of help.

cheers
Bruce
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now