i found out this is the easy way to get sourse code of any url: void CFreeSMSDlg::OpenURL(void* param) { CInternetSession mySession; CHttpFile *pHttpFile; CString url,tmpStr; char inBuf[500]; memset(inBuf,NULL,sizeof(inBuf)); UINT nBytesRead; CFreeSMSDlg* pThis; pThis = (CFreeSMSDlg*)param; bool bNotFinished = true; do { try { // Open HTTP file pHttpFile =(CHttpFile *) mySession.OpenURL(pThis->pUrl); } catch (CInternetException) { ::MessageBox(NULL,_T("Received Exception from OpenURL()"),_T("Error!"),NULL); bNotFinished = false; } if(pHttpFile == NULL) { ::MessageBox(NULL,_T("Error in OpenURL"),_T("Error!"),NULL); bNotFinished = false; } else { nBytesRead = pHttpFile->Read(inBuf, sizeof(inBuf)); } } while (bNotFinished); pThis->bIsSent = true; _endthread(); }
It is never late to learn