Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parse Image links

Posted on 2006-06-30
4
Medium Priority
?
223 Views
Last Modified: 2010-04-23
Hi

I need to parse a collection of image links from a HTML string, download and place them in a temp file to be used as ButtonBase.Image Property .

The image links that need to be parsed are along the lines "http://anywebsite.com/sample" & (a integer 1-100) & ".png"

Can anybody please help?
0
Comment
Question by:IAJWDDIY
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Accepted Solution

by:
kouroshparsa earned 1000 total points
ID: 17021776
webAddress is a string containing the URL
fileName and filePath are strings

Try
            Dim client As New WebClient
            client.DownloadFile(webAddress, filePath & "\" & fileName)
            client.Dispose()
Catch
            MsgBox(Err.Description)
End Try
'--------------
Note: You can either read HTML files or download, save them and read them. (depending on what you want)
Downloading is described above.
To Read, try some thing like:
            Dim stream As IO.Stream = client.OpenRead("webAddress")
            Dim bf(1024) As Byte
            Dim str As String = stream.Read(bf, 0, 1000)
or better yet, look at MSDN:

http://msdn2.microsoft.com/en-us/library/system.net.security.sslstream.beginread.aspx

 Then search for all "http\\"s ...store all web addresses of images in an array.
0
 
LVL 8

Assisted Solution

by:kaliyugkaarjun
kaliyugkaarjun earned 1000 total points
ID: 17023051
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question