View Single Post
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 04-05-2011 , 08:03   Re: [EXTENSION] cURL & Hash
Reply With Quote #6

On your Test #5 you save output to a file using fwrite:
Code:
CURL_DEFAULT_OPT(curl);
test_5_file_body = CreateTestFile("test5_body.txt", "w");
test_5_file_header = CreateTestFile("test5_header.txt", "w");
curl_easy_setopt_handle(curl, CURLOPT_WRITEDATA, test_5_file_body);
curl_easy_setopt_handle(curl, CURLOPT_HEADERDATA, test_5_file_header);
curl_easy_setopt_string(curl, CURLOPT_URL, "http://www.google.co.uk/index.html");
But I would like to change the callback function to something else. Normally when using libcurl it would be something like this:
Code:
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, mycallback)
Is it possible to do this using your extension? And how would I set up the callback?

My objective would be to fetch the contents of a page into a string.
GoD-Tony is offline