关于最近的小米代码门事件的一段代码,求解释!!
求翻译以下c#代码,谢谢!(本人是代码“零蛋”(零基础),求详细解释!另外,由于是新注册的,分数也没多少,望谅!)string hdcontrolurl = "http://tc.hd.
request = WebRequest.Create(hdcontrolurl) as HttpWebRequest;
request.CookieContainer = cookieContainer;
request.Method = "GET";
request.Host = "tc.hd.
request.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36";
response = (HttpWebResponse)request.GetResponse();
Stream instream = response.GetResponseStream();
sr = new StreamReader(instream, encoding);
content = sr.ReadToEnd();
(以上代码来源于帖子《小米抢购过程简单分析》:http://www.)
如果可以的话,麻烦再解释一下以下两段代码:
代码(1)
hdcontrol({"stime":1381645438,"status":{"allow":false,"miphone":{"hdstart":false,"hdstop":false,"hdurl":"","duration":null},"mibox":{"hdstart":false,"hdstop":false,"hdurl":"","duration":null}}})) v$ [2 F- p, d( ^( z
代码(2)
hdcontrol({; m/ i$ g% G& ~/ a
"stime": 1381645438,
"status": {, }; l) q, i+ k; H. d" @
"allow": false,6 k5 D, s! u! P8 h0 v/ q
"miphone": {1 w& z% @: o8 e' O( B. I# M* g
"hdstart": false,4 H* B3 ~' L. ~5 [: H! ]
"hdstop": false,2 p3 ]2 l) v! l! }2 h6 |8 v
"hdurl": "",9 E7 b) F/ U C7 B2 i
"duration": null$ Y; N5 e) @+ P0 b0 \* c/ Z
}, @ \8 n5 X5 o+ e
"mibox": {/ a2 I6 M } O: ?, a9 K
"hdstart": false, a& N; D6 O) [- V* j
"hdstop": false,& b7 _5 H. x i4 O2 E, L: Y$ O
"hdurl": "",9 E0 D# y/ I8 {- S$ L
"duration": null: s) t) |+ G! k* T k6 f7 U
}8 i, L. U8 a0 N% a% E0 x. \" b& H" |: Z! |
} y% ]/ @, D% y% P2 _
}))
(以上代码来源于帖子《小米3今天开放购买,死活是抢不到,一直是排队中,悲催。 刚刚看到官网论坛上有个阴谋论,不知道是否可行?》:http://m.)