The ServerVariables collection is used to retrieve the server variable values.
The ServerVariables collection retrieves the values of predetermined environment variables and request header information.
Server variables obtain most of their information from headers. It is wise to not trust the data that is contained in headers, as this information can be falsified by malicious users. For example, do not rely on data such as cookies to securely identify a user.
Below table lists name of few server variable and the value it returns
Variable | Description |
---|---|
ALL_HTTP | Returns all HTTP headers sent by the client. Always prefixed with HTTP_ and capitalized |
CONTENT_TYPE | Returns the data type of the content |
HTTP_REFERER | Returns a string containing the URL of the page that referred the request to the current page using an <a> tag. If the page is redirected, HTTP_REFERER is empty |
REMOTE_ADDR | Returns the IP address of the remote host making the request |
URL | Returns the base portion of the URL |
Click here for a complete list of Server Variables
Request.ServerVariables Collection
No comments:
Post a Comment