on 6/06/2001 12:01 AM, "Sjoerd Op 't Land" <[EMAIL PROTECTED]> was very
helpful

Thank you. This is helpful. But I am going to expose my great ignorance here
(some things I do mighty well, but this is not one of them).

This is an .mt script, right? So what is involved in putting up a MetaCard
cgi? Will I have to have a version of MetaCard on the server? How do I
format the MetaCard stack that contains the cgi script?

Now at the moment, I am using Tripod for my server. That will change, later,
but for right now it is available and I need to use it.

All this is very new to me, but absolutely necessary for the person I am
working with. 

Thanks

Raymond

> 
> Raymond E. Griffith wrote/ schreef:
> 
>> I have been wrestling with the POST command for some time now with little
>> success.
>> 
>> Here is what I want to do. I want to have a MetaCard/Revolution program sent
>> a POST to a URL containing field data. The URL is a CGI that should receive
>> the data and email it back to me.
>> 
>> Is this so hard to do?
> Difficulty is relative, but... I think its absolutely doable:
> WARNING: This is from the top of my head, so...
> ----------------
> The CGI script:
> ----------------
> #!/usr/bin/mc
> on startup
> # first make an array qParameter with all the arguments
> # as key
> set itemdel to "="
> put replaceText($QUERY_STRING,"&",return) into tQuery
> repeat with i = 1 to the number of lines in tQuery
> put urlDecode(item 2 of line i of tQuery) into qParameter[item 1 of line
> i of tQuery]
> end repeat
> 
> # store the mail body in a temporary file
> put qParameter["message"] into url "file:email.txt"
> 
> # generate the shell to be executed
> put "mail -s" && quote & qParameter["subject"] & quote && qParameter["to"]
> && "< email.txt" into eCommand
> 
> # execute the mail command
> put shell(eCommand) into buffer
> 
> #write minimal set of HTTP headers to stdout
> put "Content-Type: text/plain" & cr
> put "Content-Length:" && the length of buffer & cr & cr
> put buffer
> end startup
> 
> ----------------
> The MC script:
> ----------------
> post "message=" & urlEncode(field "message body") & "&to=" & urlEncode(field
> "to") & "&subject=" & urlEncode(field "subject") to
> "http://www.mctools.org/~rgriffit/sendmail.cgi";
> answer it
> 
> Or something like this...
>> I'm having a hard time not saying bad words over my lack of success.
>> *&%%$**!!!
>> 
>> Any kind suggestions would be appreciated.
>> 
>> Raymond 
> Hope this helps,
> Sjoerd


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to