用INET(CHttpFile)下载有重定向链接时获取最终URL的方法.
摘要:
CString GetRedirectedURL(CString p_URL){ CString szFinalUrl; CInternetSession _session; CStdioFile * pcsf; CHttpFile * pchf; try { pcsf = _session.OpenURL(p_URL, INTERNET_FLAG_TRANSFER_BINARY); CHttpFile * pchf = (CHttpFile*)pcsf; CHAR buf[2048] = {0}; DWORD dwOptionReaded = 0; pchf->QueryOptio.. 阅读全文
posted @ 2013-07-10 17:03 horane.jo 阅读(607) 评论(0) 推荐(0) 编辑