|
-
Dec 20th, 2005, 10:44 AM
#1
Thread Starter
Junior Member
[RESOLVED] Download Image Automatically
How can I Get an image Automatically from any website using code, without opening the browser.
-
Dec 20th, 2005, 10:47 AM
#2
Re: Download Image Automatically
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 20th, 2005, 10:47 AM
#3
Thread Starter
Junior Member
Re: Download Image Automatically
I am trying to download Image from a website using code, any suggestions please?
-
Dec 20th, 2005, 10:53 AM
#4
Thread Starter
Junior Member
Re: Download Image Automatically
I see that u r a dynamic not a static , how fast r u . . .
Thnx man a lot I appreciate it.
-
Dec 20th, 2005, 11:38 AM
#5
Re: Download Image Automatically
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 (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!!!!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 21st, 2005, 02:44 AM
#6
Thread Starter
Junior Member
Re: Download Image Automatically
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|