nousername
02-20-2009, 01:24 PM
I have an Active Server Page running on a Linux server running the Apache web service, which is designed to send an e-mail message from a contact page.
I want to perform a reverse DNS lookup of the sender's IP address. Currently I am obtaining the sender's IP address using:
Dim senderInternetAddress
'Used to obtain the sender's IP address
senderInternetAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If senderInternetAddress = "" Then
senderInternetAddress = Request.ServerVariables("REMOTE_ADDR")
End If
I tried to obtain the hostname for the IP address using the code below:
senderHostName = Request.ServerVariables("HTTP_HOST")
This code only provides the same IP address as the ("REMOTE_ADDR") server variables.
How can I obtain the DNS name for the IP address being obtained using either the ("HTTP_HOST") or ("REMOTE_ADDR") variables.
I want to perform a reverse DNS lookup of the sender's IP address. Currently I am obtaining the sender's IP address using:
Dim senderInternetAddress
'Used to obtain the sender's IP address
senderInternetAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If senderInternetAddress = "" Then
senderInternetAddress = Request.ServerVariables("REMOTE_ADDR")
End If
I tried to obtain the hostname for the IP address using the code below:
senderHostName = Request.ServerVariables("HTTP_HOST")
This code only provides the same IP address as the ("REMOTE_ADDR") server variables.
How can I obtain the DNS name for the IP address being obtained using either the ("HTTP_HOST") or ("REMOTE_ADDR") variables.