How to get Server Variables in ASP

Summary:

One way of collecting valuable web statistics is through the use of server variables. Server variables retrieve information from the user's browser. You can use these to get all kinds of useful information, such as browser details, connection methods, and more. To get a list of all of the available server variables, create a servervariables.asp page with the code below:

Examples:

<%
Dim strVariable
For each strVariable in Request.ServerVariables
	Response.Write "<p>" & strVariable & " = " & request.servervariables(strVariable) & "</p>"
Next
%>

Written By: S2H, 25th June 2006

Share This Page

Advertisement