RE: Can LWP::Simple tranfer image urls?

2003-06-23 Thread Dan Muey
> 
> Do I need to change the http header for transfering image 
> urls?  I get errors 

Yes.
And what do you mean by 'transfer'?
You may want Net::FTP

> when I transfer a jpg:
> picture cannot be displayed because it contains errors.
> 

Try this:

#!/usr/bin/perl -w

use strict;
use LWP::Simple;
print "Content-type: image/gif\n\n";
print get("http://www.google.com/images/logo.gif";);


Use warnings and strict to track down errors.

HTH

DMuey

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



RE: Can LWP::Simple tranfer image urls?

2003-06-23 Thread Dan Muey
> Finally, some usefull stuff in Perl ;-))
>

Finally? This is the Perl list not the PHP list ;p

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



Re: Can LWP::Simple tranfer image urls?

2003-06-22 Thread Jerry Rocteur
Finally, some usefull stuff in Perl ;-))

On Saturday, Jun 21, 2003, at 18:52 Europe/Brussels, Randal L. Schwartz 
wrote:

The code for 2001, 2002, and 2003 is in the thread starting at:

  


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


Re: Can LWP::Simple tranfer image urls?

2003-06-21 Thread Randal L. Schwartz
The code for 2001, 2002, and 2003 is in the thread starting at:

  

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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



Re: Can LWP::Simple tranfer image urls?

2003-06-20 Thread Mark G
O BoY, These are deffinitly Camel girls 

Mark
- Original Message - 
From: "zentara" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 3:08 PM
Subject: Re: Can LWP::Simple tranfer image urls?


> On Fri, 20 Jun 2003 09:09:21 EDT, [EMAIL PROTECTED] wrote:
>
> >Do I need to change the http header for transfering image urls?  I get
errors
> >when I transfer a jpg:
> >picture cannot be displayed because it contains errors.
>
> It works well for me on linux.
> This is one of my favorite scripts by Merlyn. :-)
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> $|++;
>
> use LWP::Simple;
>
> my @models = qw(amy aurelie daniela elsa fernanda
> heidi josie lujan michelle molly noemie shakara
> shirley veronica yamila);
>
> for my $model (@models) {
> for my $id (1..9) {
> my $url = sprintf
>
"http://sportsillustrated.cnn.com/features/2001/swimsuit/gallery/%s/%s_%d_lg
.jpg",$model,
> $model, $id;
> my $file = "$model-$id.jpg";
> print "$url => $file: ";
> print +mirror($url, $file), "\n";
> }
> }
> __END__
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Re: Can LWP::Simple tranfer image urls?

2003-06-20 Thread zentara
On Fri, 20 Jun 2003 09:09:21 EDT, [EMAIL PROTECTED] wrote:

>Do I need to change the http header for transfering image urls?  I get errors 
>when I transfer a jpg:
>picture cannot be displayed because it contains errors.

It works well for me on linux.
This is one of my favorite scripts by Merlyn. :-)

#!/usr/bin/perl
use warnings;
use strict;

$|++;

use LWP::Simple;

my @models = qw(amy aurelie daniela elsa fernanda
heidi josie lujan michelle molly noemie shakara
shirley veronica yamila);

for my $model (@models) {
for my $id (1..9) {
my $url = sprintf
"http://sportsillustrated.cnn.com/features/2001/swimsuit/gallery/%s/%s_%d_lg.jpg",$model,
$model, $id;
my $file = "$model-$id.jpg";
print "$url => $file: ";
print +mirror($url, $file), "\n";
}
}
__END__


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



Can LWP::Simple tranfer image urls?

2003-06-20 Thread Motherofperls
Do I need to change the http header for transfering image urls?  I get errors 
when I transfer a jpg:
picture cannot be displayed because it contains errors.