#!/usr/bin/perl -w # The following code deals with the form data if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/["]//gi; $value =~ s/[+]/ /gi; $FORM{$name} = $value; } } $keyword=$FORM{keyword}; chdir("/home/1008/gnicoll/www.abernyte.net/public_html"); opendir(DIR, "."); print "Content-type: text/html\n\n"; print""; print"
"; print""; print" | "; print" |
Search Results - Your Search for the keyword(s) $keyword returned the following results: |
Noogle
Home | ";
print""; print" | "; print" | "; print" | Search Results | ";
print"
"; print" | "; print" | ";
print"";
print"";
print"";
while($file = readdir(DIR))
{
next if ($file !~ /.html/);
open(FILE, $file);
$foundone = 0;
$title = "";
while ( "; print"
"; $count = 0; $listed=1; } close(FILE); } if($listed ne 1) {print "
| ";
print"
";
print"
|