国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
C#抓取網頁內容的函數,
private byte[] GetURLContents(string url)
{
    // The downloaded resource ends up in the variable named content.
    var content = new MemoryStream();
 
    // Initialize an HttpWebRequest for the current URL.
    var webReq = (HttpWebRequest)WebRequest.Create(url);
 
    // Send the request to the Internet resource and wait for
    // the response.
    using (WebResponse response = webReq.GetResponse())
    {
        // Get the data stream that is associated with the specified URL.
        using (Stream responseStream = response.GetResponseStream())
        {
            // Read the bytes in responseStream and copy them to content. 
            responseStream.CopyTo(content);
        }
    }
 
    // Return the result as a byte array.
    return content.ToArray();
}
//該代碼片段來自于: http://www.sharejs.com/codes/csharp/6577
本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
winForm的淘寶請求之路
C#模擬網站頁面POST數據提交表單
HttpWebRequest簡單實用封裝應用類
C#同步方法和異步方法的區(qū)別
5種網絡爬蟲過程中,網頁去重方法的介紹!
C# 實現(xiàn)http協(xié)議GET、POST請求類 - 大家新聞網 - Powered by S...
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服