Home | Advertising Info186 USERS CURRENTLY ONLINE   
   Site Search Contact Us Thursday, April 27, 2017  
 
 







DISCUSSION ARCHIVES
DISCUSSION ARCHIVES 2
DISCUSSION ARCHIVES 3
BLOG

 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 
 


Server Variables




USAGE:  Request.ServerVariables (variable)

Consult The Microsoft Documentation For A Full Description Of All The Server Variables Below.

Variable

ALL_HTTP
AUTH_TYPE
CONTENT_LENGTH
CONTENT_TYPE
GATEWAY_INTERFACE
HTTP_ACCEPT
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_USER_AGENT
HTTP_COOKIE
HTTP_HOST
HTTP_COOKIE
LOGON_ACCEPT_ENCODING
PATH_INFO
PATH_TRANSLATED
QUERY_STRING
REMOTE_ADDR
REMOTE_IDENT
REMOTE_HOST
REQUEST_METHOD
SCRIPT_MAP
SCRIPT_NAME
SERVER_NAME
SERVER_PORT
SERVER_PORT_SECURE
SERVER_PROTOCOL
SERVER_SOFTWARE
URL
Here are two examples of what you could do with server variables.

HTTP_REFERER server variable can be used as a Dynamic Previous Page Hyperlink.

Paste this code into an asp file and you have an instant (Back Button).
Or add a graphic if you wish.

<a href="<%= Request.ServerVariables("HTTP_REFERER") %>">Previous Page</a>

Previous Page


HTTP_USER_AGENT server variable can determine the client browser type

<%=Request.ServerVariables("HTTP_USER_AGENT")%>

CCBot/2.0 (http://commoncrawl.org/faq/)


Retrieve a Users IP Address Using Server Variables

Regarding there server variables you can always loop through them as well and show all of them which is very helpful when testing.

<table border="1" width="500" style="border-collapse: collapse">
<%
For each item in Request.ServerVariables
   Response.Write("<tr><td>" & item & "</td><td>")
   Response.Write(Request.ServerVariables(item))
   Response.Write("</td></tr>" & vbCrLf)
Next
%>

</table>

 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2017 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com