Grab Image From Web Server

H

Hunter Hillegas

Hi,

I am still fairly new to Ruby.

Given the URL of an image, I would like to craft some code that grabs the
image from the remote Web server and puts it in a file on the local machine.

Can anyone give me some tips on doing that?

Thanks,
Hunter
 
J

Jim Weirich

lists said:
Hi,

I am still fairly new to Ruby.

Given the URL of an image, I would like to craft some code that grabs
the
image from the remote Web server and puts it in a file on the local
machine.

Can anyone give me some tips on doing that?

Thanks,
Hunter

requre 'open-uri'
open("output_filename.jpg", "w") { |outfile|
outfile.write open("http://image_url.jpg") { |inf|
ifile.read
}
}
 
R

Raveendran Perumalsamy

lists said:
Hi,

I am still fairly new to Ruby.

Given the URL of an image, I would like to craft some code that grabs
the
image from the remote Web server and puts it in a file on the local
machine.

Can anyone give me some tips on doing that?

Thanks,
Hunter

Hi All,

Get all images from given URL

Desktop Application from jazzez

Kindly go through below link and download the EXE file.

http://www.box.net/shared/m5vxqpr3r1

Install in Windows machine and enjoy with impressed images

Regards,
P.Raveendran
http://raveendran.wordpress.com
 
B

Brian Candler

Could it be at all possible that a class has just been set an exercise
of downloading an image from a webserver, and the class notes also
pointed to the existence of the ruby-talk mailing list? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,175
Messages
2,570,944
Members
47,492
Latest member
gabbywilliam

Latest Threads

Top