Solved

Form Data and headers

Posted on 1997-11-12
2
172 Views
Last Modified: 2013-12-25
How do I find out what header information is included in a form request?  I know how to get the form data, but would like to see what else is being passed as well.
0
Comment
Question by:grleach
2 Comments
 
LVL 1

Accepted Solution

by:
twexperts earned 50 total points
ID: 1831159
grleach, here is a list of the most common paramaters passed from a browser to the cgi program:
You can access them by using: $ENV{'<string name>'}
for example $user = $ENV{'REMOTE_USER'}
note that most browsers only fill in a few of these variables.
If you want to take a look at something, go to this
url and press 'Get my Info'
http://www.twexperts.com/info.html
Hope this is what you wanted,
Robin (twexperts)
accept()
Return a list of MIME types that the remote browser accepts. If you give this method a single argument corresponding to a MIME type, as in $query->accept('text/html'), it will return a floating point value corresponding to the browser's preference for this type from 0.0 (don't want) to 1.0. Glob types (e.g. text/*) in the browser's accept list are handled correctly.
auth_type()
Return the authorization type, if protection is active. Example "Basic".
raw_cookie()
Returns the "magic cookie" maintained by Netscape 1.1 and higher in a raw state. You'll probably want to use cookie() instead, which gives you a high-level interface to the cookie functions.
path_info()
Returns additional path information from the script URL. E.G. fetching /cgi-bin/your_script/additional/stuff will result in $query->path_info() returning "/additional/stuff". In addition to reading the path information, you can set it by giving path_info() an optional string argument. The argument is expected to begin with a "/". If not present, one will be added for you. The new path information will be returned by subsequent calls to path_info(), and will be incorporated into the URL generated by self_url().
path_translated()
As per path_info() but returns the additional path information translated into a physical path, e.g. "/usr/local/etc/httpd/htdocs/additional/stuff". You cannot change the path_translated, nor will setting the additional path information change this value. The reason for this restriction is that the translation of path information into a physical path is ordinarily done by the server in a layer that is inaccessible to CGI scripts.
query_string()
Returns a query string suitable for maintaining state.
referer()
Return the URL of the page the browser was viewing prior to fetching your script. Not available for all browsers.
remote_addr()
Return the dotted IP address of the remote host.
remote_ident()
Return the identity-checking information from the remote host. Only available if the remote host has the identd daemon turned on.
remote_host()
Returns either the remote host name or IP address. if the former is unavailable.
remote_user()
Return the name given by the remote user during password authorization.
request_method()
Return the HTTP method used to request your script's URL, usually one of GET, POST, or HEAD.
script_name()
Return the script name as a partial URL, for self-refering scripts.
server_name()
Return the name of the WWW server the script is running under.
server_software()
Return the name and version of the server software.
virtual_host()
When using the virtual host feature of some servers, returns the name of the virtual host the browser is accessing.
server_port()
Return the communications port the server is using.
user_agent()
Returns the identity of the remote user's browser software, e.g. "Mozilla/1.1N (Macintosh; I; 68K)"
user_name()
Attempts to obtain the remote user's name, using a variety of environment variables. This only works with older browsers such as Mosaic. Netscape does not reliably report the user name!
0
 

Author Comment

by:grleach
ID: 1831160
That isn't exactly what I am looking for.  I would like to see the stream of data which is coming into the script as I am trying to create an application which will emulate a browser without showing any graphical information.  It is going to be automated with no user interface.
Any other ideas?
Thanks
Gerrard
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Logon script fails 23 61
Convert .csv to tab delimited text 11 50
Advice on a batch file that copies, moves, sftp's & deletes files 6 36
powershell switch statement 7 31
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question