Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

libcurl

Name: Anonymous 2010-05-05 6:02

How do I post image replies with libcurl? I've already gotten it to make text replies:

#include <curl/curl.h>

int main(void)
{
    CURL* easyhandle = curl_easy_init();
    curl_easy_setopt(easyhandle, CURLOPT_URL, http://sys.4chan.org/lit/imgboard.php);
    curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, "resto=632537&name=Anonymous&email=sage&sub=libcurl&com=image replies&pwd=hello&mode=regist");
    curl_easy_perform(easyhandle);
    curl_easy_cleanup(easyhandle);
    return 0;
}

And yes I'm aware of all the negative stigma attached to libcurl. You have to start somewhere though. At least it's not the curl (command line tool).

Name: Anonymous 2010-05-05 6:12

HA HA YOUR USING LIBCURL

Name: Anonymous 2010-05-05 6:16

>>2
Just you wait. One of these days I'll be the greatest programmer ever.

Name: Anonymous 2010-05-05 6:58

And yes I'm aware of all the negative stigma attached to libcurl

i am not, and im doing a quite similar program as you.

elaborate

Name: Anonymous 2010-05-05 7:18

>>4
CURL/libcurl are used as insults around here because they're too simplistic.

How far have you gotten with it? Could you show me how to make image replies?

Name: Anonymous 2010-05-05 7:19

libwww was here, curl can suck my cock

Name: Anonymous 2010-05-05 7:26

If you are going to write it in C you might as well just write your own HTTP client and not use a library.

http://www.ietf.org/rfc/rfc2388.txt

Name: Anonymous 2010-05-05 8:04

>>7
Why?

Name: Anonymous 2010-05-05 8:20

Name: Anonymous 2010-05-05 12:24

>>7
Why reinvent the wheel for a pet project?

Name: Anonymous 2010-05-05 13:45

>>10
To learn.

Name: Anonymous 2010-05-05 19:47

Anybody?

Name: Anonymous 2010-05-05 19:52

>>12
What the fuck is wrong with you? Were you dropped as a child and did that leave you unable to use Google?

http://curl.haxx.se/libcurl/c/postit2.html

Name: Anonymous 2010-05-05 20:02

>>13
Doesn't work for me and I've already googled that example along with several others.

I'm more interested in this line:
curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, "name=Anonymous&email=sage");

It says to post an image file you have to append the filename with "@" character. For instance: curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, "upfile=@image.jpg");

The "@" however is not getting detected. Does this have something to do with the double quotes? Yes, I'm new to this.

Name: Anonymous 2010-05-05 20:33

>>14
No ``it'' fucking doesn't.  Where are you getting this nonsense?

Name: Anonymous 2010-05-06 1:15

Name: Anonymous 2010-05-06 3:05

man curl_formadd

Name: Anonymous 2010-05-06 4:34

>>16
Way to link to a page that doesn't support anything you said.

Name: Anonymous 2010-05-06 8:35

Curl it easy

Name: Anonymous 2010-05-06 9:05

>>14
Surely you should use some kind of filehandle instead, and a curl_upload function if there is one.

Name: Leah Curler 2010-05-06 9:21

Leah Curler

Name: Lube Cudder 2010-05-06 10:42

Lube Cudder

Name: Luke Vader 2010-05-06 11:40

Luke Vader

Name: Anonymous 2011-02-03 4:08

Name: Anonymous 2013-01-19 23:43

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List