the_net_2.0
10-25-2010, 04:58 PM
does anyone know if ASP has the same resource as PHP does? (as in title). If the readers are not familiar with PHP, the 'server' global can return things like remote IP address, browser type, host name, etc...
thanks!
Simon_MT
10-26-2010, 09:14 AM
I have used this in the past, I can't remember where!!
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<title>Server Variables</title>
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" link="#804040" vlink="#008080" alink="#004080">
<HTML>
<BODY>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="750">
<tr>
<td valign="top" align="left" width="150"><font face="Arial" size="2" color="#FF0000"><b>Variable Name</b></font></td>
<td valign="top" align="left" width="600"><font face="Arial" size="2"><b>Value</font></b></td>
</tr>
<%
for each name in request.servervariables
%>
<tr>
<td valign="top" align="left" width="150">
<font face="Arial" size="1" color="#FF0000">
<%= name %></font></td>
<td valign="top" align="left" width="600">
<font face="Arial" size="1"><%= request.servervariables(name) %></font></td>
</tr>
<%
Next
%>
</div>
</BODY>
</HTML>
Simon
ChipperT
10-26-2010, 09:45 AM
Here is a great link that explains the request.servervariables collection in ASP:
http://www.w3schools.com/asp/coll_servervariables.asp
the_net_2.0
10-26-2010, 10:44 AM
Here is a great link that explains the request.servervariables collection in ASP:
http://www.w3schools.com/asp/coll_servervariables.asp
diddn' even think of checking w3 schools! thanks Chipper! that's exactly what I need.