I’m using this code to save images from a specific URL using Image::Grab. But the image gets saved in 0 bytes so there is no image.
#!/usr/bin/perl
use Image::Grab;
$pic->url('hhttp://www.vikingskipet.no/cam_1.jpg')
$pic->grab;
# Now to save the image to disk
$time = time();
open(IMAGE, ">$time.jpg") || die"$time.jpg: $!";
binmode IMAGE; # for MSDOS derivations.
print IMAGE $pic->image;
close IMAGE;
I hope someone can help me. I’m using cronjobs to run the script every minute.
just use
getstore()fromLWP::Simple