rhytha
05-03-2007, 08:00 AM
Hi devs,
we have a problem in storing image data to a file in scraper script. the scraper fetching image data from site url and the data will be stored in a jpg file by cration a new .jpg file and writing the image data to that file. All are working fine and the .jpg file also created but i cant view that image.
the following is the code i have used to create .jpg file
my $image = $content->{CONTENT};
$tmpname=$item->{F->{ITEM_ID}}."_".$i.".jpg";
open (FILEHANDLE, "> ".$tmpname) or plog('info', 'failed to create file');
binmode(FILEHANDLE);
print FILEHANDLE "$image";
close(FILEHANDLE);
Plz help me out.:confused:
Thankx in advance
we have a problem in storing image data to a file in scraper script. the scraper fetching image data from site url and the data will be stored in a jpg file by cration a new .jpg file and writing the image data to that file. All are working fine and the .jpg file also created but i cant view that image.
the following is the code i have used to create .jpg file
my $image = $content->{CONTENT};
$tmpname=$item->{F->{ITEM_ID}}."_".$i.".jpg";
open (FILEHANDLE, "> ".$tmpname) or plog('info', 'failed to create file');
binmode(FILEHANDLE);
print FILEHANDLE "$image";
close(FILEHANDLE);
Plz help me out.:confused:
Thankx in advance