代码如下:
HttpWebRequest myRequest;
myRequest = (HttpWebRequest)HttpWebRequest.Create(url);
myRequest.ContentType = "application/x-www-form-urlencoded;";
myRequest.Method = "POST";
byte[] b = System.Text.Encoding.GetEncoding("utf-8").GetBytes(query_string);
myRequest.ContentLength = b.Length; System.IO.Stream newStream = myRequest.GetRequestStream(); //开始提交数据
newStream.Write(b,0,b.Length);
newStream.Close();// query_string 为提交的数据: 是这样的:a=a&b=ald&d=ok
// url为提交的地址。
// 还有必须要用POST格式提交~~ 我是用来做Trackback的,可自己Trackback自己都出这403错误,请问一下怎么解决呢?
HttpWebRequest myRequest;
myRequest = (HttpWebRequest)HttpWebRequest.Create(url);
myRequest.ContentType = "application/x-www-form-urlencoded;";
myRequest.Method = "POST";
byte[] b = System.Text.Encoding.GetEncoding("utf-8").GetBytes(query_string);
myRequest.ContentLength = b.Length; System.IO.Stream newStream = myRequest.GetRequestStream(); //开始提交数据
newStream.Write(b,0,b.Length);
newStream.Close();// query_string 为提交的数据: 是这样的:a=a&b=ald&d=ok
// url为提交的地址。
// 还有必须要用POST格式提交~~ 我是用来做Trackback的,可自己Trackback自己都出这403错误,请问一下怎么解决呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货