能力值:
( LV2,RANK:10 )
|
-
-
2 楼
不知你是否绕过了浏览器,光是走底层HTTP通信无需验证服务器证书的(OpenSSL、Indy之类实现),除非服务器要求客户端提供访问授权的证书(网银、支付)
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
try
{
strDescript = "提交成功完成!";
// AfxMessageBox(strDescript);
CString strServer, strObject, strHeader, strRet;
unsigned short nPort;
DWORD dwServiceType;
if(!AfxParseURL(strUrl, /*AFX_INET_SERVICE_HTTPS*/dwServiceType, strServer, strObject, nPort))
{
strDescript = "不是有效有网络地址!";
AfxMessageBox(strDescript);
// return bRet;
__asm {jmp _Quit}
}
CInternetSession sess;
CHttpFile* pFile;
CHttpConnection *pServer = sess.GetHttpConnection(strServer, nPort);
if(pServer == NULL)
{
strDescript = "对不起,连接服务器失败!";
AfxMessageBox(strDescript);
// return bRet;
__asm {jmp _Quit}
}
//::OutputDebugStringA("1");
pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET/*HTTP_VERB_POST*/, strObject, NULL, 1, NULL, NULL,
INTERNET_FLAG_EXISTING_CONNECT|INTERNET_FLAG_RELOAD);
if(pFile == NULL)
{
strDescript = "找不到网络地址";
AfxMessageBox(strDescript);
// return bRet;
__asm {jmp _Quit}
}
|
|
|