Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1. Is there any way that I can know

Status
Not open for further replies.

igowi

Programmer
Sep 18, 2001
45
US
1. Is there any way that I can know what string is sent to
a CGI script by a web browser?
The method in the form tag is POST.
I tried a lot. But, it doesn't work by sending name=value&name=value. I dont' know why?

2. Can I know what web server is running?
how can I check it?
 
1. When the form method=post, the name/value pair string is sent differently than with method=get. The data looks the same, but is passed so that the program can read it via it's standard input, rather than in an environment variable.

2. In PERL you can get a string indicating what web server is running by using $ENV{'SERVER_SOFTWARE'}. Here's what the string looks like from my ISP:

Rapidsite/Apa-1.3.14 (Unix) FrontPage/4.0.4.3 mod_ssl/2.7.1 OpenSSL/0.9.6 Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
If you are using perl for your CGI, then you can use the CGI.pm package which handles the parameters transparently:

Code:
#!perl
use CGI qw( :all );

print header, start_html;
foreach $param ( param ) {
    print p( "param is " . param( $param ) );
}
print end_html;

Cheers, Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top