cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: finally

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 8 Nov 2001 15:44:19 +0100 (MET)

On Thu, 8 Nov 2001, Nick Chirca wrote:

> > > How am I suppose to fill in this form, some text ?
> >
> > For details on how to script HTML forms with curl, check out the
> > TheArtOfHttpScripting document.
>
> Well, I do read this document from
> http://curl.haxx.se/docs/httpscripting.shtml
>
> Actually this doecument is the first I read about cURL and it made
> install and try to use it to solve my problems. And yes, I am having
> progresses, I think...
>
> But the problem is that the document we're talking about describes how to
> use cURL from the command line.

Yes, and that is because I wrote that document and I've hardly ever used the
perl interface. I would *die* to actually get some documentation from someone
else to display. That just doesn't happen very often.

So, until someone that actually knows how the perl interface works and what
to think about when using it writes something, there just won't be any such
document or web page.

> curl -d "birthyear=1905&press=OK" www.hotmail.com/when/junk.cgi
>
> But how can I "translate" the above curl command line in a perl script
> line ?

This is just a POSTFIELDS set to "birthyear=1905&press=OK" and URL set to
"www.hotmail.com/when/junk.cgi".

> What about the below form ? What would be the appropriate perl/libcurl
> approach ?
>
> <form action="verify_send_messages.cgi?PartnerUsername=blue_eyed&Username=blue_eyed" id="DataEntryForm" method="post" name="DataEntryForm">
> <font face="Comic Sans MS" size="2">Send a Message to
> blue_eyed</font><br>
> <textarea cols="48" name="Content" rows="8"></textarea><br>
> <input name="submit" type="submit" value="Send Message">
> </form>

init

set POSTFIELDS to "Content=blablabla&submit=Send%20Message"
set URL to [base
URL]/verify_send_messages.cgi?PartnerUsername=blue_eyed&Username=blue_eyed

perform

cleanup

You say this doesn't work and that returning a web page bugs. I can't claim
the opposite. I just hope that someone else can or that you will figure out
how to do it or where the bug is.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-08