Go Back   Access World Forums > Apps and Windows > Web Design and Development > ASP and ASP.NET

 
Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Old 10-25-2010, 04:58 PM   #1
the_net_2.0
Banned
 
Join Date: Sep 2010
Posts: 812
Thanks: 3
Thanked 16 Times in 15 Posts
the_net_2.0 is on a distinguished road
ASP equivalent to PHP's $_SERVER superglobal

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!

the_net_2.0 is offline   Reply With Quote
Old 10-26-2010, 09:14 AM   #2
Simon_MT
Newly Registered User
 
Join Date: Feb 2007
Location: United Kingdom
Posts: 2,177
Thanks: 2
Thanked 162 Times in 158 Posts
Simon_MT has a spectacular aura about Simon_MT has a spectacular aura about
Re: ASP equivalent to PHP's $_SERVER superglobal

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
Simon_MT is offline   Reply With Quote
Old 10-26-2010, 09:45 AM   #3
ChipperT
Banned in 13 Countries
 
ChipperT's Avatar
 
Join Date: Jun 2010
Location: Tacoma, WA
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
ChipperT is on a distinguished road
Re: ASP equivalent to PHP's $_SERVER superglobal

Here is a great link that explains the request.servervariables collection in ASP:

http://www.w3schools.com/asp/coll_servervariables.asp

__________________
What am I doing writing code when I could be lifting pints in Dingle?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ChipperT is offline   Reply With Quote
Old 10-26-2010, 10:44 AM   #4
the_net_2.0
Banned
 
Join Date: Sep 2010
Posts: 812
Thanks: 3
Thanked 16 Times in 15 Posts
the_net_2.0 is on a distinguished road
Re: ASP equivalent to PHP's $_SERVER superglobal

Quote:
Originally Posted by ChipperT View Post
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.

the_net_2.0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to asp and collect data NigelShaw General 0 06-29-2009 12:02 PM




All times are GMT -8. The time now is 02:58 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World