|
-
Jan 10th, 2000, 06:45 PM
#1
Thread Starter
Fanatic Member
I want to get pictures from a website on a regular basis. However, the program needs to run in the background. I managed to get load the page and all, but i need a way to save the pictures found on this page. Can anyone help me??
-
Jan 10th, 2000, 07:41 PM
#2
Frenzied Member
to download a single picture you can do this
put an inet control on a form...
Code:
Dim localFile As String
Dim strURL As String
Dim b() As Byte
localFile = "c:\mark.jpg"
strURL = "http://graffiti.virgin.net/dms.mbs/images/mark.jpg"
' Retrieve the file as a byte array.
b() = Inet1.OpenURL(strURL, icByteArray)
Open localFile For Binary Access _
Write As #1
Put #1, , b()
Close #1
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 10th, 2000, 08:57 PM
#3
Thread Starter
Fanatic Member
Thanx for the help. I appreciate it. Another q. Is it possible to get the filenames of pictures, if you don't have them? I was thinking of reading the HTML file into a string (or sumptin') and the searching for .jpg and .gif extensions. But this way, i'll get buttons, and banners and stuff too.
-
Jan 11th, 2000, 12:40 PM
#4
That is the way to do it, you could ignore most banner by checking for the default width/height of them, width="468" height="60
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
-
Jan 13th, 2000, 04:37 PM
#5
Frenzied Member
to search for pictures you could parse the file looking for img tags but if you want to grab backbrounds as well (no img tag there) you could parse the hypertext backwards and search for fig. or gpj. etc
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
-
Jan 14th, 2000, 01:13 AM
#6
Addicted Member
To parse for img tags, take a look at http://www.vbsquare.com/tips/tip174.html
------------------
"To the glory of God!"
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
|