curl_easy_init - Start a libcurl easy session. This function must be the first function to call, and it returns a CURL easy handle that you must use as input to other functions in the easy interface. This call MUST have a corresponding call to curl_easy_cleanup when the operation is complete.
#include CURL *curl_easy_init( );
#include CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); curl_easy_cleanup(curl); }
If this function returns NULL, something went wrong and you cannot use the other curl functions.
http://curl.haxx.se/libcurl/c/curl_easy_init.html