[boulder.pm] environment vars from a cgi script
Salvador
speralta at peakpeak.com
Tue Apr 23 09:49:49 CDT 2002
Does this illustrate what you are looking for?
#!/usr/bin/perl
if ($ENV{'REQUEST_METHOD'} eq 'GET') {
@pairs = split(/&/, $ENV{'QUERY_STRING'});
} elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
} else {
print "Content-type: text/html\n\n";
print "<P>Use Post or Get";
}
Myke Komarnitsky wrote:
> At 09:19 PM 4/22/2002 -0600, you wrote:
>
>> I don't follow what you're asking. When you say "content string passed
>> to the script" I think QUERY_STRING, but that's not what you're after,
>> I think, based on the output I saw. Sorry for being dense, but could
>> you provide a really specific example of what exactly you're wanting to
>> see?
>
>
> the data is passed via the method post.... however, if it was passed via
> GET, the url would look like
>
> /cgi-bin/emaillist.pl?email=the_email_address at domain.com&discuss=1&announce=0
>
> what I want is everything after the ? .... well, wherever this string
> exists if it is a POST.
More information about the Boulder-pm
mailing list