[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: retrieving gifs through HTTP from script



On 17-Jun-98 Nico De Ranter wrote:
> I need to write a script dat will download a gif from an HTTP
> server.  Unfortunately it turns out that when I telnet to the
> webserver (port 80), issue "GET test.gif" and pour the output
> into a file (making sure to remove the three header lines) the
> gif turns out not to be useable.  My best guess is that HTTP
> somehow encodes binary files when transferring them.
> Does anybody know how to download a gif that way or is their
> an app somewhere that will do this for me.

I don't know how to do it using a script, but possibly my manual approach using
Netscape could be programmed as a Java applet.

1. If you can see the URL of the gif shown in the status line when you move the
mouse over it, write this down ("http://www.site.../.../thing.gif";).

2. In netscape, open a new browser window onto http://www.site.../.../thing.gif
You will get a window showing only the gif.

3. In Netscape, then do "File"->"save as"-> ... , and you will have the gif on
your disk. This gif IS usable.

1A. If you can't find the URL of the gif as in (1), then do "View document
source" and hunt for the URL of the gif; it's usually quite easy. Then proceed
as from (2) above.

(A much less pleasant alternative is to hunt for the gif in your Netscape cache
treee: it'll be there, but good luck locating it!).

Hope this helps,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Date: 17-Jun-98                                       Time: 13:33:52
--------------------------------------------------------------------


--  
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: