Skip Navigation

irelephant [he/him]🍭

@ Irelephant @lemm.ee

Posts
49
Comments
674
Joined
3 yr. ago

  •   c
        
    PS C:\Users\USERNAME\3ds> gcc test.c -o test.exe -IC:\Users\22.tom.carroll\scoop\apps\curl\current\include -LC:\Users\22.tom.carroll\scoop\apps\curl\current\lib -lcurl
    PS C:\Users\USERNAMEl\3ds> ./test.exe
    PS C:\Users\USERNAME3ds> ls
    
    
        Directory: C:\Users\USERNAME\3ds
    
    
    Mode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-----        19/11/2024     20:48                c
    -a----        29/11/2024     21:35           1880 file.c
    -a----        29/11/2024     22:52           1409 test.c
    -a----        29/11/2024     22:52         236221 test.exe
    
    
    PS C:\Users\USERNAME\3ds>
     
      

    Its not working unfortunatly.

  • You're right, but it doesn't do anything, no matter what the code is, so I assumed that I needn't include it. Kinda stupid of me. In any case, here it is:

     
        
    /********* Sample code generated by the curl command line tool **********
     * All curl_easy_setopt() options are documented at:
     * https://curl.se/libcurl/c/curl_easy_setopt.html
     ************************************************************************/
    #include <curl/curl.h>
    
    int main(int argc, char *argv[])
    {
      CURLcode ret;
      CURL *hnd;
    
      hnd = curl_easy_init();
      curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L);
      curl_easy_setopt(hnd, CURLOPT_URL, "https://pastebin.com/api/api_post.php");
      curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
      curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "api_dev_key=MY_API_KEY&api_paste_code=test&api_option=paste");
      curl_easy_setopt(hnd, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)81);
      curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/8.9.1");
      curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
      curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
      curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
      curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
    
      /* Here is a list of options the curl code used that cannot get generated
         as source easily. You may choose to either not use them or implement
         them yourself.
    
      CURLOPT_WRITEDATA was set to an object pointer
      CURLOPT_WRITEFUNCTION was set to a function pointer
      CURLOPT_READDATA was set to an object pointer
      CURLOPT_READFUNCTION was set to a function pointer
      CURLOPT_SEEKDATA was set to an object pointer
      CURLOPT_SEEKFUNCTION was set to a function pointer
      CURLOPT_ERRORBUFFER was set to an object pointer
      CURLOPT_STDERR was set to an object pointer
      CURLOPT_HEADERFUNCTION was set to a function pointer
      CURLOPT_HEADERDATA was set to an object pointer
    
      */
    
      ret = curl_easy_perform(hnd);
    
      curl_easy_cleanup(hnd);
      hnd = NULL;
    
      return (int)ret;
    }
    /**** End of sample code ****/
    
      

    Another piece of code i tried was:

     
        
    #include <stdio.h>
    #include <curl/curl.h>
    
    int main(void) {
        CURL *curl;
        CURLcode res;
    
    
        curl_global_init(CURL_GLOBAL_DEFAULT);
        curl = curl_easy_init();
    
        if(curl) {
           
            curl_easy_setopt(curl, CURLOPT_URL, "http://localhost:5000/a");
    
         
            const char *data = "hello!";
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    
    
            res = curl_easy_perform(curl);
    
         
            if(res != CURLE_OK) {
                fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
            }
    
      
            curl_easy_cleanup(curl);
        }
    
      
        curl_global_cleanup();
    
        return 0;
    }
    
      

    compiled it with gcc test.c -o test.exe -IC:\Users\MY_USERNAME\scoop\apps\curl\current\include -LC:\Users\MY_USERNAME\scoop\apps\curl\current\lib -lcurl but you can replace the paths with wherever the libcurl include directory is (i hope).

  • Username checks out.

  • I have no spare ethernet cables.

  • Why does elon look like he was photoshopped onto himself

  • We are devoting serious resources to studying the nature of consicousness.

  • He looks like he's enjoying it.

  • shitty?

    Assuming you're referring to rickrolling.

  • Some of the pieces of information on posts is drawn with the canvas element.

  • Nice try, fed

  • The amount of posts in my reddit and lemmy drafts is massive, because i realise the answer myself.

  • Eir (crappy irish isp) got sued over their shite customer service. Now they have a twiter account you can dm for help.

  • Irish person here (also as in born, raised and living here), that is not normal.

  • Because coffee is fucking delicious

    [ citation needed]

  • Is that nicotine, or just the substances its usually consumed with? Google isnt giving any good answers.

  • I wish isps still provided hosting.

  • so, something like this?

    ___

  • just the vocal cords.

  • Same with shitter before i stopped using it.

  • On mastodon, i sometimes go to the explore page to see whats trending.