Solved

Form Data and headers

Posted on 1997-11-12
2
171 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
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 …

840 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