Products
Database Search Solution (New Version) Search Control SEO Pager Highlighter Shortcut Controls Crypt Package Free ASP.NET Controls
Geotargeting Component ASP.NET Media Player Control Flash Video Player Control Services
ASP.NET Telecommute Jobs Free IP Location Lookup Test .Net Regular Expressions CSS/Table/DIV Page Layouts Custom Programming Article Sites Master List |
Visitor Informations From Request.ServerVariables CollectionThe ServerVariables collection retrieves the values of predetermined environment variables and request header information. If you've ever wondered how to get your website visitor's name, or their IP address, or the referrer address, then look no more. Request.ServerVariables is almost all you need. Be warned that Server variables obtain most of their information from headers. It is not wise to depend a 100% on the data that is returned contained in the collection, as this information can be falsified by malicious users, like hackers, etc. To get a value from the ServerVariables collection, all you have to do is use the Request object and access the item in the ServerVariable collection using the header name. Request.ServerVariables("HeaderType")Note: The server interprets any underscore (_) characters in HeaderName as dashes in the actual header. For example if you specify LOGON_USER, the server searches for a header sent as LOGON-USER. Some useful variables are as follows: LOGON_USERThe Windows NT account that the user is logged into. REMOTE_ADDRThe IP address of the remote host making the request - This is the IP address of the user. REMOTE_HOSTThe name of the host making the request - This is also the Remote Name associated with the user. REQUEST_METHODThe method used to make the request. For HTTP, this is GET, HEAD, POST, and so on. HTTP_REFERERReturns a string containing the URL of the page that referred the request to the current page, but does not include redirect requests Furthermore, we can get Browser information using the HttpBrowserCapabilities class found in System.Web namespace in .NET Framework. To do so, you have to create an object of type System.Web.HttpBrowserCapabilities.
Dim
myBrowser As Web.HttpBrowserCapabilities Having done that, the following information can be retrieved: Platform: myBrowser.Platform Browser Language: Request.ServerVariables["http_accept_language"] Browser type: myBrowser.Type Browser version: myBrowser.Version Browser Beta: myBrowser.Beta Client CLR Version: myBrowser.ClrVersion Supports ActiveX controls: myBrowser.ActiveXControls Supports Cookies: myBrowser.Cookies Supports Frames: myBrowser.Frames Supports Java Applets: myBrowser.JavaApplets Supports Java Scripts: myBrowser.JavaScript Supports MS DOM Version: myBrowser.MSDomVersion Tutorial toolbar: Tell A Friend | Add to favorites | Feedback | |