用DOM实现文章采集--采集到网页源码(9)
来源:未知 责任编辑:责任编辑 发表时间:2014-04-20 03:40 点击:次
return null;
}
finally
{
if (stream != null)
stream.Close();
if (response != null)
response.Close();
}
return info;
}
#endregion
public RemoteRes Post(string strUrl, string postData)
{
RemoteRes info = new RemoteRes();
Stream responseStream = null;
HttpWebResponse response = null;
try
{
byte[] bytes = this._HttpEncoding.GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strUrl);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = bytes.Length;
request.Timeout = this._TimeOut;
request.UserAgent = this._UserAgent;
//request.Referer = string.Concat("http://", uri.Host);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>