' 發展單位:風禹科技驗證有限公司 ' 撰寫人:鄭子璉(Tzu-Lien, Cheng, 璉璉) ,成大水博肄,微軟最有價值專家 ' Web: http://tlcheng.twbbs.org/TLCheng/ E-Mail: qvb3377@ms5.hinet.net ' -------------------------------------------------------------------------------------- Public Module modInternet Public Function IsHttpFileExist(ByVal address As String) As Boolean Dim rtnBool As Boolean = False Dim wRequest As Net.WebRequest = Net.WebRequest.Create(address) wRequest.Method = "HEAD" Try Dim wResponse As Net.WebResponse = wRequest.GetResponse() If wResponse.ContentLength > 0 Then rtnBool = True End If Catch End Try Return rtnBool End Function Public Function MyWebDownloadFile(ByVal address As String, ByVal filename As String) As String Dim wc As New System.Net.WebClient MyCreateDirectory(MyGetPathName(filename)) MyWebDownloadFile = filename Try wc.DownloadFile(address, filename) Catch MyWebDownloadFile = "" End Try End Function End Module