Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Form Data and headers

Posted on 1997-11-12
2
Medium Priority
?
178 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 100 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

963 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