Hello, I use this bit of code to pull the text(source) from a provided url.. Maybe you can see something different with this code vrs yours.
CString CUserProfileDlg::GetFile(const char *url, const char *filename)
{
char httpbuff[HTTPBUFLEN];
TCHAR szCause[2048];
CString Cause;
Cause.Format("YES");
TRY
{
CInternetSession mysession;
CStdioFile \*remotefile = mysession.OpenURL(url,1,INTERNET\_FLAG\_TRANSFER\_BINARY|INTERNET\_FLAG\_RELOAD);
CFile myfile(filename, CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
int numbytes;
while (numbytes = remotefile->Read(httpbuff, HTTPBUFLEN))
{
myfile.Write(httpbuff, numbytes);
}
}
CATCH\_ALL(error)
{
error->GetErrorMessage(szCause,2046,NULL);
Cause.Format("%s",szCause);
}
END\_CATCH\_ALL;
return (Cause);
}
Rob