473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

download an image and save locally

Hi,

I want to download an image from the web and save it locally. I have
spent all day messing about with this and am still no where. We have
a firewall so i use the below code. I know it works down to the line
as i also use this code to download an xml file from the net. I have
been messing around with all sorts of ways to stream the image into a
local file and save it. but no luck.

Am i totally off key here, can anyone point me in the right direction
to do what i thought would be a simple thing.
<code>

Dim sURL As String
sURL = "http://www.google.ie/images/hp0.gif"

Dim wrGETURL As WebRequest
wrGETURL = WebRequest.Create(sURL)
Dim saByPassList() As String
Dim myProxy As New WebProxy("10.32.0.20:8080", True,
saByPassList, New NetworkCredential("user", "password", "domain"))

myProxy.BypassProxyOnLocal = True
wrGETURL.Proxy = myProxy
Dim objStream As Stream
objStream = wrGETURL.GetResponse.GetResponseStream()

---------------------------------------

Dim br As New BinaryReader(objStream)

Dim arrPicture() As Byte = br.ReadBytes(objStream.Length)
</code>

Thanks.
Nov 20 '05 #1
0 1128

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Aardwolf | last post by:
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now. I have an annoying problem in that I can not run the php scripts/pages locally, instead they open up in the browser as a...
3
by: JS | last post by:
I go to a website once a week to download public data. Upon submitting a form, a text file is producted and I get the usual Windows dialog box asking if I would like to open or save the text file...
0
by: Sarah Akers | last post by:
GgF ----gL5cJ72EqiGIQ0SK65Rz Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <head> <style type=3D"text/css">.eyebrow { FONT-WEIGHT: bold; FONT-SIZE: 10px; TE=
8
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client...
8
by: kieran | last post by:
Hi, I want to download an image from the web and save it locally. I have spent all day messing about with this and am still no where. We have a firewall so i use the below code. I know it...
0
by: Rhys666 | last post by:
Basically I have a link that opens my download page and the querystring identifies the type of 'template' Excel spreadsheet has asked to download. The download page reads the querystring,...
16
by: Bob Moore | last post by:
We have a requirement to put a client onto machines intended for some telephony work. The database access will be via ASP.Net pages, and that's fine, but the telephony stuff requires access to some...
2
by: standish22 | last post by:
I want to open a word document stored in my database. What I do is save the document locally, and then open a new winform that has the WebBrowser Control on it and navigate to that new file. ...
2
by: Calvin Willman | last post by:
I'm creating a Proofing Web Application, that users can upload photos, and then download and reupload if it doesn't look any good. Upload bit works fine, with the image being displayed great....
12
by: Bob Bedford | last post by:
I've to build a website where the customer can buy an image. I'm thinking in the 2 ways to let people get those images: receive them by Email or send them an image link wich validity is limited in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.