$path_to_domain=~s!/$!!; ($image,$wid,$hei)=split(/&/,$param1); $image=~s!(http://.+?/)!$path_to_domain/!;$dom=$1; $thumb=$image;$thumb=~s!(\.\w+)$!_th$1!; $wh=$wid."x".$hei; $img = Image::Magick->new; $x=$img -> Read ($image); $x=$img -> Resize($wh); $x=$img -> Write($thumb); if($^O !~ /mswin32/i){chmod(0644,"$thumb")} $thumb=~s!$path_to_domain/!$dom!; print "Content-type: text/html\n\n"; print qq~~;