本帖最后由 Cheungnotes 于 2014-8-4 22:01 编辑
抓的数据包
[PHP] 纯文本查看 复制代码 POST [url=http://user.qzone.qq.com/q/taotao/cgi-bin/emotion_cgi_forward_v6?g_tk=235994185]http://user.qzone.qq.com/q/taota ... d_v6?g_tk=235994185[/url] HTTP/1.1
Host: user.qzone.qq.com
Connection: keep-alive
Content-Length: 228
X-Real-Url: [url=http://taotao.qq.com/cgi-bin/emotion_cgi_forward_v6?g_tk=235994185]http://taotao.qq.com/cgi-bin/emo ... d_v6?g_tk=235994185[/url]
Origin: [url=http://user.qzone.qq.com]http://user.qzone.qq.com[/url]
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Accept: */*
Referer: [url=http://user.qzone.qq.com/29942036]http://user.qzone.qq.com/29942036[/url]
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: RK=qS9nG7SQYq; *********** blabla=dynamic
tid=14e1c8012a55df53ccde0600&t1_source=1&t1_uin=29942036&signin=0&con=123&with_cmt=0&fwdToWeibo=0&forward_source=1&code_version=1&format=fs&out_charset=UTF-8&hostuin=228554774&qzreferrer=http%3A%2F%2Fuser.qzone.qq.com%2F29942036
模拟提交数据
[C#] 纯文本查看 复制代码 string gtk = GetGtk(cookie);
string url = "http://taotao.qq.com/cgi-bin/emotion_cgi_forward_v6?g_tk=" + gtk;
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://user.qzone.qq.com/q/taotao/cgi-bin/emotion_cgi_forward_v6?g_tk=" + gtk,
Method="post",
Host="user.qzone.qq.com",
Referer = "http://user.qzone.qq.com/29942036",
ContentType = "application/x-www-form-urlencoded;charset=UTF-8",
Postdata = "tid=14e1c8012a55df53ccde0600&t1_source=1&t1_uin=29942036&signin=0&con=113&with_cmt=0&fwdToWeibo=0&forward_source=1&code_version=1&format=fs&out_charset=UTF-8&hostuin=228554774&qzreferrer=http%3A%2F%2Fuser.qzone.qq.com%2F29942036",
Cookie=cookie,
UserAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36",
};
//item.Header.Add("X-Real-Url", url);
//item.Header.Add("Origin","http://user.qzone.qq.com");
//item.Header.Add("Accept-Language","zh-CN,zh;q=0.8");
HttpResult result = http.GetHtml(item);
return result.Html;
总是返回:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body><script type="text/javascript"> document.domain="qq.com"; frameElement.callback({"code":-3,"message":"参数错误","result":{"code":-3,"msg":"","now":1407159665},"subcode":-1000003}); </script></body></html>
请问哪里出了问题,赐教了!
|