现在有一个网页要输入密码才能登陆,我的程序要把密码post到服务器上去,奇怪的是程序一到
sendrequest就会有异常出现,提示什么域名无法解析,但是我用openURL却可以得到登陆页面,急盼哪位高手来指教一下。部分代码及网页:CString postHeader=_T("Content-Type: application/x-www-form-urlencoded");
CString sform;
CInternetSession session;
CString str;
CString t; sform.Format(".REDORECT=index.htm&.PASSWORD=%s",cfgPwd.GetBuffer(0));// CHttpFile *pFile=(CHttpFile *)session.OpenURL(m_sURL);
try{
CHttpConnection* pConnection =session.GetHttpConnection(m_sURL);
CHttpFile *pFile=pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,m_sURL);
BOOL result=pFile->SendRequest(postHeader,(LPVOID)(LPCTSTR)sform,sform.GetLength());
}  <form name="AUTH_FORM" method="POST">
  <input type="hidden" name=".REDIRECT" value="index.htm">
  <tr><td>&#8226;Password</td><td align="right">
  <input type="password" size=30 maxlength=20 name=".PASSWORD">
  </td></tr>
  <tr><td colspan=2></td></tr>
  <tr><td colspan=2 align="right">
  <input name="OK" value="Ok" type="submit">&nbsp;<input name="CANCEL" value="Cancel" type="reset">