Everest Computers Blog About Computers and Web Design

When carrying out the web development, it is sometimes necessary to get some information from the http request about the requester - a type of browser, IP address, various path values and so on. For that, so called server variables exist - their values are obtained from the Request object.

I personally don’t remember all of them and what sort of values they supply, so I wrote a piece of ASP code that prints the values of all the server variables for the requested page. Because I mainly work with ASP, I wrote it in VB, but the Request object is available in all programming systems that deal with web development, so the code below can easily be written in any of them. Here it is:

<%

for each x in Request.ServerVariables

response.write(”<p>” & x & ” = ” & Request.ServerVariables(x) + “</p>”)

next

%>

This should return all the server variables values, one in each line.

Comments are closed.

 
Powered by WordPress |  Admin
Copyright © 2007 - 2009 Everest Computers: Computer Support & Web Design. All rights reserved.