RE: Make This URL Thingie?

new topic     » goto parent     » topic index » view thread      » older message » newer message

C. K. Lester wrote:

> > > I want to duplicate the functionality of the page by using a EU program,
> >
> > You want a Eu program to access that webpage online, not perform the
> > function of that webpage...

libCURL has functionality to allow posting (the HTTP POST method).
I haven't tried to see if it works in my wrapper (eulibCURL).
It shouldn't be difficult (probably just a few constants missing).

actually an example libCURL C program that posts is:

---
  curl = curl_easy_init();
  if(curl) {
    /* First set the URL that is about to receive our POST. This URL can
       just as well be a https:// URL if that is what should receive the
       data. */
    curl_easy_setopt(curl, CURLOPT_URL, 
"http://postit.example.com/moo.cgi");
    /* Now specify the POST data */
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, 
"name=daniel&project=curl");

    /* Perform the request, res will get the return code */
    res = curl_easy_perform(curl);

    /* always cleanup */
    curl_easy_cleanup(curl);
  }
  return 0;

----

so I imagine the only change required to eulibCURL would be to 
declare the CURLOPT_POSTFIELDS constant.

Let me know if you want to head down this path or not.

Regards,

Ray Smith
http://rays-web.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu