|
-
Aug 26th, 2000, 05:21 PM
#1
Thread Starter
Lively Member
-
Aug 26th, 2000, 05:56 PM
#2
Monday Morning Lunatic
You may need to debug this a bit, but it's a start:
Code:
#!/perl/5.6.0/bin/MSWin32-x86/perl.exe
# The file will be:
#
# --snip--
# ad1.gif
# ad2.gif
# ad3.gif
# --snip--
# etc...
open(FD, "settingsfile.dat");
@data = <FD>;
close(FD);
print "Content-type: image/gif\n";
chomp($data[0]);
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$filesize,$atime,$mtime,$ctime,$blksize,$blocks) = stat($data[0]);
print "Content-length: $filesize\n\n";
binmode STDOUT;
open(FD, $data[0]);
read(FD, $file, $filesize);
close(FD);
$data[0] = $data[0] . "\n";
print $file;
open(FD, ">settingsfile.dat");
for($i = 1; $i <= $#data+1; $i++) {
print FD $data[$i];
}
print FD $data[0]; # put just-done item to end
close(FD);
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 26th, 2000, 10:14 PM
#3
Hyperactive Member
On the chance that you are looking for client side code, try this:
http://www.builder.com/Programming/S...dt.bl_ss080700
"People who think they know everything are a great annoyance to those of us who do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|