Retrieving Environment Variables and HTTP Headers in ASP
Server environment variables are retrieved using the command shown below.
result = Request.ServerVariables("<variable-name>");
- SCRIPT_NAME - URL of the current page
- CONTENT_LENGTH - the length of content posted using the POST method
- ALL_RAW - show all HTTP headers
- HTTP_<HeaderName> - retrieve individual HTTP header names
- HTTP_USER_AGENT - retrieves the browser name
- HTTP_ACCEPT_LANGUAGE - the preferred language and country, multiples can be separated by commas
- HTTP_REFERER - the web page which called the current document
- REMOTE_ADDR - this reads the clients IP Address
Multiple domains can be accessed what on what can effectively be called a Virtual Server.