All pastes #639136 Raw Edit

Stuff

public text v1 · immutable
#639136 ·published 2007-07-30 11:11 UTC
rendered paste body
	CURL *curl;    
    curl = curl_easy_init();
	
	std::ofstream file;
	file.open("test.pdf");
    if(curl != NULL){
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER,m_errorBuffer);
        curl_easy_setopt(curl, CURLOPT_URL,url);
        curl_easy_setopt(curl, CURLOPT_HEADER,0);
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
		curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &OasE::writeToBuffer);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &file);        
    }