| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curlpp mailing list Archives
[cURLpp] Newbie help connecting to ssl
From: John Vorwald <john_vorwald_at_msn.com>
Date: Wed, 27 Sep 2006 05:54:00 -0400
The code below is an attempt to login into the site
#include <cstdlib>
#include <string>
std::ofstream os_log;
// Buffer for holding web access errors
// This is the writer call back function used by curl
// Is there anything in the buffer?
// How much did we write?
return result;
int main(int argc, char *argv[])
std::string url("http://www.tsp.gov/account/index.html#login"),
// url = "https://tspweb2.tspsec.tsp.gov/";
os_log.open("output.log",std::fstream::out);
// Write all expected data in here
// Our curl objects
bool is_done(false), is_first_call(true);
while (!is_done)
if (curl)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, web_writer);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U;
// Attempt to retrieve the remote page
// Always cleanup
os_log << web_buffer;
} // if curl
_______________________________________________
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info