I am running Mandrake linux and I have libcurl2-7.10.3 installed on it. I want to use the curl functions to read a html file from the web into a string.
I currently have this
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, " res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
This gets output from and prints it to the screen. I need to have it output to a string which i can then parse.
I dont know Curl at all but I only need it for this very simple function. If anyone knows a better way to read a page from the web from a C program please let me know
I had previously written this in php but i need more speed
in php it looked somthing like this
$fp = fopen("
and then i could just read $fp as if it were a local file
Thanks for any help you can give me
I currently have this
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, " res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
This gets output from and prints it to the screen. I need to have it output to a string which i can then parse.
I dont know Curl at all but I only need it for this very simple function. If anyone knows a better way to read a page from the web from a C program please let me know
I had previously written this in php but i need more speed
in php it looked somthing like this
$fp = fopen("
and then i could just read $fp as if it were a local file
Thanks for any help you can give me