|
-
Jun 28th, 2000, 09:21 PM
#1
i want resolve the IP Address to Get Host Name ,
E.G.
192.198.0.2 => Server
thank you.
-
Jun 28th, 2000, 11:54 PM
#2
Guru
-
Jun 29th, 2000, 01:12 AM
#3
can i use that with vb ?
and how ?
[Edited by S-O on 06-29-2000 at 03:20 PM]
-
Jun 30th, 2000, 04:28 PM
#4
Addicted Member
Hi,
A great place to look for code that you want like this is on http://www.mvps.org/vbnet
-
Jun 30th, 2000, 05:29 PM
#5
That's all very well (the VBnet howto) but how do you do it in an asp script?
There's a server variable "REMOTE_HOST" but that always returns an IP for me...
-
Jul 1st, 2000, 06:20 AM
#6
Addicted Member
The following variables will return the name of the server:
HTTP_HOST
SERVER_NAME
-
Jul 1st, 2000, 05:16 PM
#7
Nah...tis the hostname of the client requesting the asp page that I want... REMOTE_HOST is meant to do it but it just returns the same as REMOTE_ADDR ...is that because the server doesn't have access to a proper DNS?
-
Jul 1st, 2000, 05:57 PM
#8
Addicted Member
Well the majority of people accessing pages won't have a host name, simply an IP address. If you just want specific servers to access your pages then I think that REMOTE_HOST will give you what you want.
-
Jul 1st, 2000, 06:12 PM
#9
Nah...doesn't seem to work... our firewall for instance (fw0.haltoncollege.ac.uk) has a static IP and very deffinately has a proper hostname...but everytime that server visits a page I just see it's IP address...I only recognise it because I remember its IP...I see it that often. 
That's not the only example... my site keeps a log of all visits to the start page and none off the IPs are resolved when the page is supposed to display REMOTE_HOST.
-
Jul 2nd, 2000, 06:00 AM
#10
Addicted Member
Well using HTTP_REFERER gives a host name. What about HTTP_HOST? I'm guessing here. Here is the script that I use to get all the header variables:
<%
For Each Item In Request.ServerVariables
Response.Write Item & " - " & Request.ServerVariables(Item) & "<BR>"
Next
%>
-
Jul 2nd, 2000, 10:32 AM
#11
Monday Morning Lunatic
matthewralston - your server log won't display the host name because if it did, every time someone visited your page, the server would have to do a reverse DNS lookup, which takes time. Apache does have this option, but it is off by default.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jul 2nd, 2000, 12:12 PM
#12
Guru
per the advice of VBSQUARE, I checked out the VBNET site:
http://www.mvps.org/vbnet/code/netwo...namefromip.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|