All pastes #360428 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-17 13:33 UTC
rendered paste body
#include <stdio.h>
#include <ctype.h>
#include <curl/curl.h>

int main(void)
{
        goto_url_f();
}

int goto_url_f()
{
        CURL* handle = curl_easy_init();

        if(handle != NULL)
        {
                CURLcode code = curl_easy_setopt(handle, CURLOPT_URL, "http://www.google.com");

                if(code != CURLE_OK)
                {
                        printf("Something happend!\n");
                }
                else
                {
                        printf("We have a handle!\n");
                        CURLcode curl_easy_perform(CURL* handle);
                        // simply output the page contents? do I need to another OPTION?
                }
        }
        else
        {
                printf("Something went horribly wrong!\n");
        }
}