For POST, as specified in HTTP standard,

The pairs of variables and values are passed in the content. In order to
do it well, you need to write a header and the content, such as the
following:

POST /cgi-bin/script.cgi HTTP/1.0
User-Agent: blah blah
Accept: blah blah
Host: blah blah
Content-type: blah blah
Content length: 123456

a=1&b=2&c=3...

This should be it. Check out the HTTP specification of at www.w3c.org
for more details.


Liguo (Leo)



Barnaby Puttick wrote:
> 
> This maybe the wrong list, but do any of you guys no how to emulate what
> a browser does when it POSTs a form to a cgi script from another script.
> 
> if I print the:
> 
> print "location: http://www.site.com/cgi-bin/script.cgi\r\n\r\n";
> 
> header, I can redirect my script to another, but
> cant pass it any variables ( unless i use the GET method.)
> 
> I know that the browser passes the variables in the following format via
> stdout:
> 
> var1='1'&var2='2'...... etc
> 
> I have tried printing this immediatly after, before and inbetween the the
> two \n\n's.
> 
> Any one got any ideas of how to make this work? or any better ones?
> 
> TIA
> 
> Barnaby Puttick
> 
> 
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to