网页post发送方式

adobase 2014-07-22 12:17:13
	CString	str1 = "POST /UserLogin.aspx HTTP/1.1\r\n";
CString str2 = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/QVOD, application/QVOD, */*\r\n";
CString str3 = "Referer: http://passport.csdn.net/UserLogin.aspx\r\n";
CString str4 = "Accept-Language: zh-cn\r\n";
CString str5 = "Content-Type: application/x-www-form-urlencoded\r\n";
CString str6 = "Accept-Encoding: gzip, deflate\r\n";
CString str7 = "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; POTU(RR:28031409:0:5513822); Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; CIBA)\r\n";
CString str8 = "Host: passport.csdn.net\r\n";
CString str9 = "Content-Length: 669\r\n";
CString str10 = "Connection: Keep-Alive\r\n";
CString str11 = "Cache-Control: no-cache\r\n";

CString str17 = "Bh97Uk6ofQQady&ctl00%24CPH_Content%24tb_LoginNameOrLoginEmail=" + m_strUser + "&ctl00%24C";
CString str18 = "PH_Content%24tb_Password=" + m_strPassword +"&ctl00%24CPH_Content%24tb_ExPwd=" + m_strCode + "&ClientKey";


网上下了个代码 但是 str17 和str18 不知道是从哪找的数据 求指教。
...全文
543 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Eleven 2014-07-23
  • 打赏
  • 举报
回复
用抓包工具抓个包看看需要发送的数据,然后用CInternetSession类相关的函数模拟提交即可。
  • 打赏
  • 举报
回复
你所说的str17 是post的内容。不同网站post的内容不同。
adobase 2014-07-22
  • 打赏
  • 举报
回复
人阿 人阿 快来阿。
adobase 2014-07-22
  • 打赏
  • 举报
回复
引用 2 楼 evi10r 的回复:
建议你拿抓包工具 看下http包 然后模拟下send出去就好了
抓包了 但是没有str17的数据 ..
W1nds 2014-07-22
  • 打赏
  • 举报
回复
建议你拿抓包工具 看下http包 然后模拟下send出去就好了

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧