ASP equivalent to PHP's $_SERVER superglobal (1 Viewer)

the_net_2.0

Banned
Local time
Today, 08:24
Joined
Sep 6, 2010
Messages
812
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

Registered User.
Local time
Today, 13:24
Joined
Feb 26, 2007
Messages
2,177
I have used this in the past, I can't remember where!!
Code:
<%@ 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
 

Users who are viewing this thread

Top Bottom