"Shawn Bower" <[EMAIL PROTECTED]> wrote in message
001301c2d3de$5093d020$6401a8c0@Beast">news:001301c2d3de$5093d020$6401a8c0@Beast...
> I'm trying to write a script that will open a socket connection to a
> website and return a gif.  I got it working to the point where and send
> the request and receive the response.....

<snip a bunch of code />

You dont need to work on that low of a level. Check this out:

#!/usr/bin/perl -w
use strict;
use LWP::Simple;

open(CHARTFILE, "> /home/trwww/public_html/vanessa.jpg") or die("open
failed: $!");
binmode( CHARTFILE ); # to be portable
print CHARTFILE
get('http://www.z957.net/html/concertcal/images/vanessa-carlton.jpg');
close( CHARTFILE );

The power is in get(). It fetches only document content and discards http
headers.

then I type http://localhost/~trwww/vanessa.jpg in my browser and get to
look at her beautiful face ;0)

hth,

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to