[Memphis.pm] Submitting Form Data

Keith W. Sheffield sheff at pobox.com
Fri Mar 17 18:36:15 CST 2000


Matt Bledsoe wrote:
> 
> I'm trying to make a perl script that will submit data to a cgi as if I had
> clicked a button on the web site to do the same.  It's got me stumped and
> those two linux journal pages didn't help me much either.  Any ideas?
> 
> Matt
> 
> BTW exactly how many people are on this list?  I haven't seen much happening
> on it =)

well, for cgi programs that process the parameters using the GET method,
the URL contains the parameters.  The C and Perl CGI libraries/modules
that I've seen can handle GET and POST, so if the program is using a
library or module to extract the parameters, chances are that one can
send data to the CGI program with either method.

example

http://someserver/cgi-bin/myform.cgi?var1=data1&var2=data2

You should also use the escape function that I believe is a part of
CGI.pm to encode the data so spaces and other things are treated
properly.

The nice thing about GET, is that one can test it by just typing in the
url or having it bookmarked.


-- 
Oxymoron: Sure bet.
Keith W. Sheffield sheff at pobox.com
----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------




More information about the Memphis-pm mailing list