home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Pavilions / BrainOpera / cgi-bin / start-cookies.cgi < prev    next >
Text File  |  2017-09-21  |  947b  |  33 lines

  1. #!/usr/local/bin/perl
  2.  
  3. # This script is for testing cookies.
  4. # It takes the name and email address from the form and sets them as cookies
  5. # written by Ben Adida (benjamin@media.mit.edu)
  6.  
  7. do "/www-admin/httpd/cgi-bin/cgi-hacks.pl";
  8. do "/www-admin/old-httpd2/cgi-bin/cookies.pl";
  9. do "/www-admin/old-httpd2/cgi-bin/redirect.pl";
  10.  
  11. require 'flush.pl';
  12.  
  13. sub html_header {
  14.     print "Content-type: text/html\n";
  15.     &flush(STDOUT)
  16. }
  17.  
  18. &find_form_args("name|email");
  19. &html_header;
  20. &set_cookie("name","$name");
  21. &set_cookie("email","$email");
  22. &flush(STDOUT);
  23. print "\n";
  24. print "<HEAD><TITLE>The cookies have been recorded</TITLE></HEAD>
  25. <BODY>
  26. <center><h1>The cookies have been recorded !!</h1>
  27. <hr size=3>
  28. <h3>You can go browse around, come back to <a href=\"/cgi-bin/whoami.cgi\">this page</a> and see that the cookies know who you are !!</h3>
  29. <hr></center>
  30. <a href=\"/test/\"> Go back to testing page</a>
  31. <hr>
  32. <address>benjamin@media.mit.edu</address>
  33. </body>";