#!/usr/bin/perl ################################################################### # Building a Web Site Index by Keywords to Search # # with JavaScript SiteSearch Engine, see: # # http://members.tripod.com/~schick/sitesuche.html # # # # Version 3.0 4Jun99, Perl Version 5.001 Win32 # # written by Arnold Schick (Copyright) # # # # This Perl script is free for domenstic use # # and is provided "as it is" (using at your own risk) # # # # This Perl script >>start.cgi<< is to copy into # # your cgi-bin directory on your local machine # # (file: http://members.tripod.com/~schick/start.txt) # # AND the related Perl script: key.cgi # # (file: http://members.tripod.com/~schick/key.txt) # # AND the related Perl script: spage.cgi # # (file: http://members.tripod.com/~schick/spage.txt) # # # # The HTML document with a link and FORM element to get this # # start page looks like # # # #
# #get Start Page # # # # # # List of used files and names: # # # # Names: Perl script : start.cgi # # Perl script : key.cgi # # Perl script : spage.cgi # # call: /cgi-bin/start.cgi from a FORM, method=post (s. above) # # # # note: this script create files which are to # # name within a FORM of that related # # HTML document, deleting of files is # # also possible. # # # # Don't place this script into a public cgi-bin directory # # on a public Web server, it's a maintain tool of # # your own Web Site files on a local machine (PC) # # # # if you use Apace Web server on WIN32, use the directive # # #!perl in place of #!/usr/bin/perl at top of this script # # # ################################################################## ################################################### # Please define a temporary file below: # # there will be save paths and dir names # ################################################### $temp_file="c:\\tmp\\js_tmp.dat"; $content_length = $ENV{'CONTENT_LENGTH'}; read(STDIN, $posted, $content_length); $posted =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $posted =~ s/\+/ /g; @fields = split (/&/, $posted); foreach $name (@fields) { ($n, $w) = split(/=/, $name); $tokens{$n} = $w; } if (($temp_file) and (-e $temp_file)) { open(INFILE, "<$temp_file"); chomp; @allLines =
created with Perl Script written by Arnold Schick
PART4 ; # finally, clean up, be sure for the next run: $posted=""; ################ End of this Perl Script #############################################