Rev CGI Post

Dave Cragg dave.cragg at lacscentre.co.uk
Mon Aug 6 03:28:03 EDT 2007


On 6 Aug 2007, at 06:21, Bridger Maxwell wrote:


>   My CGI is receiving the data, and I try to send a POST back, but  
> no data
> is in the "it" variable or the result.  How do I get the data?  Is  
> the POST
> command available in a CGI?  Should I just do this with my own custom
> sockets?


> My CGI Code:
> put empty into gBuffer
>   REPEAT until length(gBuffer) >= $CONTENT_LENGTH
>     read from stdin until empty
>     put it after gBuffer
>   END REPEAT
>   put "cmd=_notify-validate&" & gBuffer into vReturn
>
>   post vReturn to "http://www.sandbox.paypal.com/cgi-bin/webscr"
>  --After this post, the "it" variable is empty, and so is the result

The libUrl library isn't automatically available for CGI scripts. You  
can get a version for CGI use here:

http://www.lacscentre.co.uk/liburl/releases.html

Also, in the last line above, I think you need the "url" keyword.

    post vReturn to url "http://www.sandbox.paypal.com/cgi-bin/webscr"

Cheers
Dave



More information about the use-livecode mailing list