while(read(filehandle,$buf,60*57){ $unf .=encode_base64($buf); } #### #!/usr/bin/perl use MIME::Base64; $imgpath = "/home/freexxxm/public_htmlews_photos"; # Ed. - rot13ed to make firewall safe $cat="Nany-Frk"; open (LOG, ">> log2"); opendir (DM, "/home/usr/public_htmlews_photos") or print "$today ERROR couldn't get contents of
dir $!\n" ;
@files=grep { /\.jpg/ } readdir(DM); closedir(DM); $img=$files[rand(@files)]; while ($seen){$img++}; $img; print "$img $!\n"; open(FILE, "$imgpath/099.jpg") or print LOG "$today ERROR opening image while posting $!\n";
while (read(FILE, $buf, 60*57)) { print LOG"$buf$!"; $unf .=encode_base64($buf); } print "$unf"; close FILE; close LOG;