Thanks everyone, I'll look into this and come back in a little while.
@ Codeplug
I was using the disphelper library's Donwnload Web Page function. More specifically:
Code:
void DownloadWebPage(LPCTSTR szURL)
{
CDispPtr objHTTP;
CDhStringA szResponse, szStatus;
try
{
ofstream os("file.txt");
dhCheck( dhCreateObject(L"MSXML2.XMLHTTP", NULL, &objHTTP) );
dhCheck( dhCallMethod(objHTTP, L".Open(%S, %T, %b)", L"GET", szURL, FALSE) );
dhCheck( dhCallMethod(objHTTP, L".Send") );
dhCheck( dhGetValue(L"%s", &szStatus, objHTTP, L".StatusText") );
cout << "Status: " << szStatus << endl;
dhCheck( dhGetValue(L"%s", &szResponse, objHTTP, L".ResponseText") );
os << szResponse;
}
catch (string errstr)
{
cerr << "Fatal error details:" << endl << errstr << endl;
}
}
I don't know if that's the best way, as it sometimes is slow. Does anyone know a better way? Thanks.