How can I Get an image Automatically from any website using code, without opening the browser.
Printable View
How can I Get an image Automatically from any website using code, without opening the browser.
you will need the path to the image...
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() DownloadFile "http://www.url.com/etc/etc/test.txt", "C:\Test.txt" If Len(Dir("C:\Test.txt")) <> 0 Then MsgBox "Success!" End Sub
I am trying to download Image from a website using code, any suggestions please?
I see that u r a dynamic not a static :thumb: , how fast r u . . .
Thnx man a lot I appreciate it.
TheMinime..
first of all.. Welcome o the forums! (I just noticed this was your first post)
I have 2 suggestions for u though..
1) please be a little more patient.. 3 minutes between original post and bump post is too short.. although this is the best place :D (and the fastest ;)) to get anwsers...sometimes it takes a little while for someone to reply..
2) if this is resolved.. please go to the top of the page (Above your first post) and click thread tools.. then Mark Thread resolved
Thanks!!!! ;)
Dear Static,
Thank you for the code it's resolved, and thank you for ur suggestions.
if anyone u know needs help in any web application please tell me, I am a web developer.