Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying an image with a URL path to my server

Status
Not open for further replies.

gi11iesm

Programmer
Sep 18, 2008
2
I have searched for somehow to do this, but can not find any results, I am wondering if anyone can help me with this small problem ... Using VB.NET I am trying to make a script that will copy an image from any given web site to a folder on my server.

For example, if there is an image that has a URL of say:
Taking the URL of that image and assigning it to a String ... how to I take the URL in the string and make a copy of the image saving it to a folder on my server?

If anyone has any suggestions of help, or where to look for help, it would be great.
 
create a web request using the url.
get the stream.
load the stream into an Image object (you may need to convert the stream to a byte array)
save the Image object to file.

there are example of how to do this on the web. google create 1. HttpWebRequest
2. Loading/Saving Image from stream.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top