[San-Diego-pm] Photo download problem
Joel Fentin
joel at fentin.com
Sun Aug 22 13:57:03 PDT 2010
THE FILE
http://fentin.com/cgi-bin/temp.pl
============================
THE PERL CODE
#!/usr/bin/perl -w
use strict;use DBI;use CGI qw/:standard/;
BEGIN{use CGI::Carp qw(carpout
fatalsToBrowser);carpout(\*STDOUT);$|=1;} #Don't buffer err msg
use LWP::Simple;
my ($Content2,$f);
print "Content-type: text/html\n\n";
$f =
'http://commons.wikimedia.org/wiki/File:PacificSilverFir_7645.jpg';
$Content2 = get($f);
print length($Content2)."<br>";
$f =
'http://upload.wikimedia.org/wikipedia/commons/1/19/PacificSilverFir_7645.jpg';
$Content2 = get($f);
print length($Content2)."<br>";
$f = 'http://fentin.com/Ecuador/B_Tuncarta-Children.jpg';
$Content2 = get($f);
print length($Content2)."<br>";
print "<BR>DONE";
============================
Wikimedia permits the downloading of photos and hotlinking. Yet I
can't get it to do anything with perl. The two URLs above (same
photo in each case) work in the FF browser. The third example is
from my own website as test. It downloads content.
I sure would appreciate any clue as to what is at work here.
--
Joel Fentin tel: 760-749-8863
Biz Website: http://fentin.com
Personal Website: http://fentin.com/me
More information about the San-Diego-pm
mailing list