hi all,
i have got a hyperlink:
for eg: www.mywebsite.com/data/showdata.asp?code=999
i want to open this page programatically and save it to my local harddisk.
pls guide me, how to do that.
regards and thanx in advance.
prakash
Printable View
hi all,
i have got a hyperlink:
for eg: www.mywebsite.com/data/showdata.asp?code=999
i want to open this page programatically and save it to my local harddisk.
pls guide me, how to do that.
regards and thanx in advance.
prakash
I would just use a little VB App as below...
VB Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function Private Sub Form_Load() 'example by Matthew Gates ([email protected]) DownloadFile "www.mywebsite.com/data/showdata.asp?code=999", "c:\YourFile.htm" End Sub
thanx smith,
but what if the file is not available on the server??
regards
prakash