Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is a tough one. Or maybe not..

Status
Not open for further replies.

IonelBurtan

Programmer
May 25, 2001
601
RO
The problem is very simple. On my site I had made a log machanism in which I have the code

Dim strREMOTE_HOST
....
strREMOTE_HOST=Request.ServerVariables("REMOTE_HOST")

Further the strREMOTE_HOST is inserted into a table from a mdb. But whenever I look to my log I see the the REMOTE_HOST is the same like REMOTE_ADDR, I mean is an IP instead of somethink like I have checked some IPs and the corespond to some WWWs but they are not inserted right.

Can this problem be solved.

Any help greatly appreciated,
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Hello,
See what MSDN says in article:
HOWTO: Configure REMOTE_HOST to Perform a Reverse DNS Lookup in IIS

"By default, performing a Request.ServerVariables("REMOTE_HOST") in ASP returns a null value, which causes Internet Information Server (IIS) to return the value of REMOTE_ADDR, the IP address of the client. This is by design to increase performance for Web hosting. However, by changing a setting in the metabase, IIS performs a reverse DNS lookup and returns the host name of the client connecting."

They have a solution. Take a look.
D.
 
Hi,

Maybe you could use PATH_INFO, but this only gives the path from the root, not the whole URL.

This is just an idea, but perhaps you could use JavaScript to do it. If you are using frames, you could make a very small frame with no content to process the insert.
If not, you could use a hidden layer and load an asp page in it. Or some other way to reload a page. (don't ask me how :-s )

An example if you would be using frames:
Code:
<script>
strREMOTE_HOST = document.location.href;
top.frames.hiddenFrame.window.location.replace(&quot;writeToDB.asp?fullUrl=&quot; & strREMOTE_HOST)
</script>

Hope this was helpfull in any way?

Gtz,

Kristof -------------------
Check out my new site:

Any suggestions are more than welcome.
There's a LOT of work to do, so judge fairly. :)
 
Hi,

This is what Visual Interdev library says:

REMOTE_HOST:
The name of the host making the request. If the server does not have this information, it will set REMOTE_ADDR and leave this empty.

In your post I can't figure out exactly what you are looking for, but maybe you want to have the info like:

LOCAL_ADDR:
Returns the Server Address on which the request came in. This is important on multi-homed machines where there can be multiple IP addresses bound to a machine and you want to find out which address the request used

PATH_INFO:
Extra path information as given by the client. You can access scripts by using their virtual path and the PATH_INFO server variable. If this information comes from a URL, it is decoded by the server before it is passed to the CGI script.

PATH_TRANSLATED:
A translated version of PATH_INFO that takes the path and performs any necessary virtual-to-physical mapping.

I hope it helps a bit,

Erik
 
I shouldn't underlined it, of course I ment:

REMOTE_HOST:[/b}

LOCAL_ADDR:

PATH_INFO:

PATH_TRANSLATED:

Erik
 
ErikL,(suppose you're from Holand, I've seen your firms site, remember I log IPs :)))
I know what MSDN says, the other elements I know'em by heart.There is no other Server Variabile implyed.

The most interesting response I got from dianal until know. I am researching. thank you.

Kristof, sorry you cannot do that from javascript as far as I know, it's a server-side problem.The code you have written will return the my server, not the one of the client. (Thanks anyway) s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top