Solved

Form Data and headers

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now