
UserLanguages | 339
HttpRequest
Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
UserHostAddress
stringvar = Request.UserHostAddress
Returns the IP address of the client making the request.
Parameter
stringvar
A string variable to receive the client IP address.
Example
The example writes the UserHostAddress, UserHostName, and UserLanguages
properties to the browser:
Sub Page_Load( )
Dim HostAddress, HostName, Languages( ) As String
Dim iCounter As Integer
HostAddress = Request.UserHostAddress
HostName = Request.UserHostName
Languages = Request.UserLanguages
Message.Text = "Client IP Address: " & HostAddress & "<br/>"
Message.Text &= "Client Machine Name: " & HostName & "<br/>"
For iCounter = 0 To Languages.GetUpperBound(0)
Message.Text &= "Client Language " & iCounter & ": " & _
CStr(Languages(iCounter)) & "<br/>"
Next iCounter
End Sub
UserHostName
stringvar = Request.UserHostName
Returns a string that contains the DNS hostname of the client making the request.
Parameter
stringvar
A string variable to receive the hostname.
Example
See the example for the UserHostAddress property.
Notes
If no DNS server is available that can resolve the client IP address to a DNS name,
the UserHostName property returns the IP address of the client (just like the User-
HostAddress property).
UserLanguages
stringArray = Request.UserLanguages
Returns a sorted ...