home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 September / PCWorld_2000-09_cd.bin / Software / Vyzkuste / cofee / CoffeeHTML85.exe / %MAINDIR% / cgi-bin / animation / nph-anim.pl next >
Encoding:
Perl Script  |  2000-07-07  |  3.0 KB  |  66 lines

  1. #!/usr/bin/perl
  2. ##############################################################################
  3. # Animation                     Version 1.2                                  #
  4. # Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
  5. # Created 9/28/95               Last Modified 11/21/95                       #
  6. # Scripts Archive at:           http://www.scriptarchive.com                 #
  7. ##############################################################################
  8. #         SEE README.TXT FILE THAT CAME WITH THIS SCRIPT FOR HELP            #
  9. #   OR: Consult the Matt's Script Archive Frequently Asked Questions if you  #
  10. #   are having any problems:                                                 #
  11. #   http://www.worldwidemart.com/scripts/faq/                                #
  12. ##############################################################################
  13. # COPYRIGHT NOTICE                                                           #
  14. # Copyright 1996 Matthew M. Wright  All Rights Reserved.                     #
  15. #                                                                            #
  16. # Animation may be used and modified free of charge by anyone so long as     #
  17. # this copyright notice and the comments above remain intact.  By using this #
  18. # code you agree to indemnify Matthew M. Wright and CoffeeCup Software from  #  
  19. # any liability that might arise from it's use.                              #  
  20. #                                                                            #
  21. # Selling the code for this program without prior written consent is         #
  22. # expressly forbidden.  In other words, please ask first before you try and  #
  23. # make money off of my program.                                              #
  24. #                                                                            #
  25. # Obtain permission before redistributing this software over the Internet or #
  26. # in any other medium.  In all cases copyright and header must remain intact #
  27. ##############################################################################
  28. # Variables
  29.  
  30. $times = "1";
  31. $basefile = "/WWW/images/animation/";
  32. @files = ("begin.gif","second.gif","third.gif","last.gif");
  33. $con_type = "gif";
  34.  
  35. # Done
  36. ##############################################################################
  37.  
  38. # Unbuffer the output so it streams through faster and better
  39.  
  40. select (STDOUT);
  41. $| = 1;
  42.  
  43. # Print out a HTTP/1.0 compatible header. Comment this line out if you 
  44. # change the name to not have an nph in front of it.
  45.  
  46. print "HTTP/1.0 200 Okay\n";
  47.  
  48. # Start the multipart content
  49.  
  50. print "Content-Type: multipart/x-mixed-replace;boundary=myboundary\n\n";
  51. print "--myboundary\n";
  52.  
  53. # For each file print the image out, and then loop back and print the next 
  54. # image.  Do this for all images as many times as $times is defined as.
  55.  
  56. for ($num=1;$num<=$times;$num++) {
  57.    foreach $file (@files) {
  58.       print "Content-Type: image/$con_type\n\n";
  59.       open(PIC,"$basefile$file");
  60.       print <PIC>;
  61.       close(PIC);
  62.       print "\n--myboundary\n";
  63.    }
  64. }
  65.  
  66.