With the ServerVariables, you can get the visitor's browser information, the referring URL, the visitor's IP address, the URL being fetched, and a bunch of other information.
Here's a list of some of the more commonly used ones:
- HTTP_USER_AGENT - the browser the visitor is using
- LOGON_USER The Windows NT account that the user is logged into.
- 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.
- QUERY_STRING Query information stored in the string following the question mark (?) in the HTTP request.
- REMOTE_ADDR - The IP address of the remote host making the request.
- 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.
- SCRIPT_NAME - A virtual path to the script being executed. This is used for self-referencing URLs.
- SERVER_NAME - The server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.
- URL - Gives the base portion of the URL.
For Each name In Request.ServerVariablesOn a presonal note, here's some of the things I've done using Request.Servervariable info:
response.write(name&": ")
response.write(Request.ServerVariables(name)&"<h;br>
Next
Here's a cool app built around Request.Servervariables: a dynamic content tree to help your users navigate around your site.
No comments:
Post a Comment