下载网页中远程图片的方法

    在网站内容编辑时, 经常会把别的网站的内容COPY后再PASTE到自己的后台编辑中, 但是其中的图片只是保存的URL, 并未COPY到本地. 下面这个方法能把COPY回来的HTML代码中的图片的URL转换成指定的URL, 并把图片下载到指定的物理路径.

Imports System
Imports System.Collections.Generic
Imports System.Text.RegularExpressions
Imports System.Net
Imports System.IO
 
Namespace EFPlatform.Helper
    
Public Class WebRequestHelper
        
RequestFileFromHtml
    
End Class

 
End Namespace


来源:http://www.cnblogs.com/ericfine/archive/2007/06/30/801561.html
           由C#转为VB.Net,时间原因先存下来,尚未测试是否正确。
posted @ 2007-07-11 17:21  fisherman  阅读(372)  评论(0)    收藏  举报