CInternetSession csiSession;
DWORD dwServiceType = 0; CString sServerName, sObject;
CString csData; INTERNET_PORT nPort; CString csTemp; int nPos=-1;
CString sGetFromURL ( _T("") );
sGetFromURL =csQuery;
if ( !AfxParseURL ( sGetFromURL, dwServiceType, sServerName, sObject, nPort ) )
throw;
CHttpConnection* pHTTPServer = NULL; pHTTPServer = csiSession.GetHttpConnection ( sServerName, nPort );
CHttpFile* pFile = NULL;
pFile = pHTTPServer->OpenRequest ( CHttpConnection::HTTP_VERB_GET, sObject, NULL, 1, NULL, NULL, INTERNET_FLAG_RELOAD );
pFile->SendRequest();
TCHAR sRaw [1024];
while ( pFile->ReadString ( sRaw, 1023 ) )
{ csData += sRaw; }
pFile->Close(); pHTTPServer->Close();
Monday, August 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment