#!/usr/bin/perl $last_updated = "2/16/2008"; # ---------$source_webpage-------------------- # # MAIN PROCEDURE: $email_body="\n Links web page parameters: \n"; $email_body.=qq^\n site_title = "<%site_title%>" ^; $email_body.=qq^\n category_name = "<%category_name%>" ^; $email_body.=qq^\n meta_name = "<%meta_name%>" ^; $email_body.=qq^\n meta_keywords = "<%meta_keywords%>" ^; $email_body.=qq^\n build_root_url="<%build_root_url%>" ^; $email_body.=qq^\n title_linked="<%title_linked%>" ^; $email_body.=qq^\n category_clean="<%category_clean%>" ^; $email_body.=qq^\n build_root_url="<%build_root_url%>" ^; $email_body.=qq^\n db_cgi_url="<%db_cgi_url%>" ^; $email_body.=qq^\n prev="<%prev%>" ^; $email_body.=qq^\n build_links_per_page="<%build_links_per_page%>" ^; $email_body.=qq^\n next="<%next%>" ^; $email_body.=qq^\n related="<%related%>" ^; $email_body.=qq^\n date="<%date%>" ^; $email_body.=qq^\n time="<%time%>" ^; $email_body.=qq^\n==========================^; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year += 1900;$month+=1;$hour+=3; $email_body .= "\n It is currently $month/$mday/$year @ $hour:$min:$sec. Template \"category\" was last update on $last_updated. "; $todays_date = "$month/$mday/$year"; &heading; if ($source_webpage ne ""){&init;} if ($query_string ne ""){$query_terms = (substr($query_string,6));} &terms; exit; # END MAIN # ********************************* sub heading { print qq@
USER OPTIONS: | Home page : <%site_title%> : <%title_linked%> | Recommend URL | Recommend record changes | Search | What's Cool |
Administrative Options: Add link| Modify link | Delete link | List All | View link | Validate user recommended links | Re-Build Pages (sw) |
|
Directory of Burlington Vermont
|
@; $email_body .= "Does ".substr($last_updated,2,2)." from $last_udpated equal $mday?"; if (substr($last_updated,2,2) eq $mday) { print qq@
|
|
@;
# Here we can pull any environment value out that we need.
$email_body .="\n \n Pull any environmental values we may need.";
$source_webpage=$ENV{HTTP_REFERER};$email_body .="\n Source Web Page = $source_webpage";
$target_webpage=$ENV{REDIRECT_SCRIPT_URI};$email_body .="\n Target Web Page = $target_webpage";
$target_domain=$ENV{HTTP_HOST};$email_body .="\n Target Domain = $target_domain";
$uri=$ENV{REQUEST_URI};$email_body .="\n path of target file/web page = $uri";
$browser_type=$ENV{HTTP_USER_AGENT};$email_body .="\n Browser or Crawler type = $browser_type";
$query_string=$ENV{QUERY_STRING};$email_body .= "\n query_string = $query_string";
$query_terms="$FORM{query_string}";$email_body .= "\n query_terms = $query_terms";
$e_recipient = 'John.Keene@gMail.com';
$e_from = "index.cgi\@$target_domain" ;
$e_realname = "index.cgi\@$target_domain" ;
$e_subject = "$uri $source_webpage";
$testing = "off";
$counter=0;
$browser_or_crawler = "unknown";
}
sub init {
$email_body .="\n \n Setup default values.";
$value1=substr($source_webpage,0,24);
$value2=substr($source_webpage,0,28);
#print "\n $source webpage $source_webpage .... value1 $value1 ..... value2 $value2....uri $uri";
#if ($value1 eq "http://burlingtonvt.org/"){$source_webpage="http://burlingtonvt.org$uri";}
#if ($value2 eq "http://www.burlingtonvt.org/"){$source_webpage="http://burlingtonvt.org$uri";}
#if ($source_webpage eq ""){$source_webpage="http://burlingtonvt.org$uri";$email_body.="\n set source_webpage to $source_webpage";};
#if ($source_domain eq ""){$source_domain="http://burlingtonvt.org";$email_body.="\n Set Source_domain to $source_domain.";}
#print " source_webpage = $source_webpage "; $email_body .="\n \n Did you come from another web page? "; if ($source_webpage eq "") { $email_body .="\n no."; # $query_terms=$search_file_name; } else {$email_body .="\n \n You came here from $source_webpage. Pull out the domain name and root directory: "; print "\n You came here from \"$source_webpage\"!"; # split name-value pairs local(@pairs) = split(/\//, $source_webpage); $counter=0;$query_terms=""; foreach $pair (@pairs) { $counter=$counter+1; ($query_term, $value) = split(/\//, $pair); $FORM{$query_term} .= $value; if ($counter eq 3) { $source_domain = "$query_term"; if ($source_domain eq "burlingtonvt.org" || $source_domain eq "www.burlingtonvt.org") { print ""; } } if ($counter eq 4) {$root_source_folder = "$query_term";} if ($counter eq 8 && $root_source_folder eq "dogpile") {$query_terms=$query_term;$email_body .="\n \n $query_terms \n\n";} $email_body .="\n $counter $query_term \n"; $last_name = $query_term; } $email_body .="\n Refering domain was $source_domain & root source folder is $root_source_folder! \n "; $email_body .="\n \n Pull out the query phrase, splitting on the ?: "; # split name-value pairs # local(@pairs) = split(/\?/, $root_source_folder); local(@pairs) = split(/\?/, $last_name); $counter=0; foreach $pair (@pairs) { $counter=$counter+1; ($query_term, $value) = split(/\?/, $pair); $FORM{$query_term} .= $value; $email_body .="\n $counter $query_term \n"; $email_body .= " \n\n determining query-text based on search-engine \"$source_domain\"."; if (substr($source_domain,0,6) eq "google" && substr($query_term,0,2) eq "as_epq") {$query_terms = $query_term}; if ($source_domain eq "search.viewpoint.com" && substr($query_term,0,2) eq "k=") {$query_terms = $query_term}; if ($source_domain eq "local.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = $query_term}; if ($source_domain eq "search.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = $query_term}; if ($source_domain eq "ask.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "altavista.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "blingo.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if (substr($source_domain,0,6) eq "google" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "search.alot.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "search.comcast.net" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "search.earthlink.net" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "search.live.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "search.msn.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "att.net" && substr($query_term,0,7) eq "string=") {$query_terms = $query_term}; if ($source_domain eq "search.blubstertoolbar.com" && substr($query_term,0,2) eq "w=") {$query_terms = $query_term}; if (substr($source_domain,0,10) eq "www.google" && substr($query_term,0,2) eq "as_epq") {$query_terms = $query_term}; if ($source_domain eq "www.search.viewpoint.com" && substr($query_term,0,2) eq "k=") {$query_terms = $query_term}; if ($source_domain eq "www.local.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = $query_term}; if ($source_domain eq "www.search.alot.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.search.comcast.net" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.ask.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.altavista.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.blingo.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if (substr($source_domain,0,10) eq "www.google" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.search.earthlink.net" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.search.live.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.search.msn.com" && substr($query_term,0,2) eq "q=") {$query_terms = $query_term}; if ($source_domain eq "www.att.net" && substr($query_term,0,7) eq "string=") {$query_terms = $query_term}; if ($source_domain eq "www.search.blubstertoolbar.com"&&substr($query_term,0,2) eq "w=") {$query_terms = $query_term}; if ( substr($query_term,0,9) eq "Keywords=") {$query_terms = $query_term}; if ( substr($query_term,0,6) eq "query=") {$query_terms = $query_term}; if ( substr($query_term,0,10) eq "searchfor=") {$query_terms = $query_term}; } $email_body .= "\n\n Coming out with \"$query_terms\"!"; if ($query_terms eq "") { $search_term = $last_name; }else{$search_term = $query_terms}; $email_body .= "\n Going into the next step with \"$search_term\" and source_domain=\"$source_domain\"!"; $email_body .="\n \n Pull out the query phrase, splitting on the & sign: "; # split name-value pairs local(@pairs) = split(/\&/, $search_term); $counter=0; foreach $pair (@pairs) { $counter=$counter+1; ($query_term, $value) = split(/\&/, $pair); $FORM{$query_term} .= $value; if (substr($source_domain,0,6) eq "google" && substr($query_term,0,2) eq "as_epq") {$query_terms = (substr($query_term,5))}; if ($source_domain eq "search.viewpoint.com" && substr($query_term,0,2) eq "k=") {$query_terms = $query_term}; if ($source_domain eq "local.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "altavista.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "blingo.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if (substr($source_domain,0,6) eq "google" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.comcast.net" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.earthlink.net" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.live.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.msn.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "ask.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "search.alot.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "att.net" && substr($query_term,0,7) eq "string="){$query_terms = (substr($query_term,7))}; if ($source_domain eq "search.blubstertoolbar.com" && substr($query_term,0,2) eq "w=") {$query_terms = $query_term}; if (substr($source_domain,0,10) eq "www.google" && substr($query_term,0,2) eq "as_epq") {$query_terms = (substr($query_term,5))}; if ($source_domain eq "www.search.viewpoint.com" && substr($query_term,0,2) eq "k=") {$query_terms = $query_term}; if ($source_domain eq "www.local.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.yahoo.com" && substr($query_term,0,2) eq "p=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.altavista.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.blingo.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if (substr($source_domain,0,10) eq "www.google" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.alot.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.comcast.net" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.earthlink.net" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.live.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.search.msn.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.ask.com" && substr($query_term,0,2) eq "q=") {$query_terms = (substr($query_term,2))}; if ($source_domain eq "www.att.net" && substr($query_term,0,7) eq "string="){$query_terms = (substr($query_term,7))}; if ($source_domain eq "www.search.blubstertoolbar.com"&&substr($query_term,0,2) eq "w=") {$query_terms = $query_term}; if ( substr($query_term,0,9) eq "Keywords=") {$query_terms = (substr($query_term,9))}; if ( substr($query_term,0,6) eq "query=") {$query_terms = (substr($query_term,6))}; if ( substr($query_term,0,10) eq "searchfor="){$query_terms = (substr($query_term,10))}; $email_body .="\n $counter $query_term \n"; } } } sub terms { print " So, you want to know about "; if ($query_terms eq "") { $email_body .="\n \n No query terms found. "; } else { $email_body .="\n Pull out % signs) in the query phrase $query_terms (if there are any): "; # split name-value pairs local(@pairs) = split(/\%/, $query_terms); $counter=0;$query_terms=""; foreach $pair (@pairs) { $counter=$counter+1; ($query_term, $value) = split(/\%/, $pair); $FORM{$query_term} .= $value; # print " $counter...$query_term...$value"; $email_body .= "\n $counter query word = $query_term..........value = $value"; if ($counter eq 1) { $query_terms .= "$query_term"; } else { # if (substr($query_term,0,2) eq "27"){$query_terms .= "\'"}else{$query_terms .= "-";} # print " \"";print substr($query_term,0,2);print "\".......$query_terms "; $query_terms .= "-"; $query_terms .= substr($query_term,2); } } $email_body .="\n Pull out - signs) in the query phrase $query_terms (if there are any): "; # split name-value pairs local(@pairs) = split(/\-/, $query_terms); $counter=0;$query_terms=""; foreach $pair (@pairs) { $counter=$counter+1; ($query_term, $value) = split(/\-/, $pair); $FORM{$query_term} .= $value; # print " $counter...$query_term...$value"; $email_body .= "\n $counter query word = $query_term..........value = $value"; $query_terms .= "$query_term+"; } $email_body .= "\n Pull out + signs in the query phrase $query_terms (if there are any): "; # split name-value pairs local(@pairs) = split(/\+/, $query_terms); $counter=0;$query_terms="";$question="unlikely"; foreach $pair (@pairs) { $counter=$counter+1;$previous_word=$query_term; ($query_term, $value) = split(/\+/, $pair); $FORM{$query_term} .= $value; $email_body .= "\n\n $counter...$query_term...$value"; print "$query_term "; # this P R I N T .= statement should always be active as a P R I N T statement. $email_body .= " \n $counter word = \"$query_term\" \n"; $word=$query_term;$query_term=lc($query_term); $value1 = substr($query_term,length($query_term)-1,1); $value2 = substr($query_term,0,length($query_term)-1); if ($query_term eq "bus" || $query_term eq "busses") { $comments .= "\n Changing term \"$query_term\" to \"buses\" to avoid records with words like \"BUSiness\" and \"BUSline\"! "; $query_term="buses";$value1="";$value2="";$email_body.="\n $comments "; } if ($query_term eq "cab") { $comments.="\"$word\" changed to \"taxi\". ";$query_term="taxi"; if ($question eq "likely") { $question="maybe not"; $comments.="\n Questions about taxi fares should be called into the taxi companies, listed below."; $email_body.="\n $comments "; } } if ($query_term eq "its"){$terms_dropped.="$query_term ";$query_term="";$value1="";$value2=""} if (substr($query_term,2,1) eq ".") { $words_dropped+=1;$terms_dropped.="$query_term ";$common_words.="$query_term ";$query_term="";$value1="";$value2=""} $email_body .= "\n\n name = \"$query_term\" \"$value1\" \"$value2\""; if (substr($query_term,length($query_term)-2,2) eq "'s"){$value1=""} $email_body .= "\n $query_term..." . substr($query_term,length($query_term)-2,2); if (substr($query_term,length($query_term)-3,3) eq "ies") { $comments .= "\n Changing $query_term to ";$query_term=substr($query_term,0,length($query_term)-3);$value1="";$value2=""; $comments .= "$query_term, so as to include records with the word $query_term"."y as well. "; $email_body.="\n $comments "; } $email_body .= " ...$query_term\n\n"; $email_body .= "\n name = \"$query_term\" \"$value1\" \"$value2\"" . length($query_term); if ($value1 eq " "){$query_term = $value2}; if ($value1 eq ","){$query_term = $value2}; if ($value1 eq "s" && length($query_term) > 3 && $query_term ne "buses"){$query_term = $value2;$value1="";}; $email_body .= "\n name = \"$query_term\" \"$value1\" \"$value2\"" . length($query_term); $email_body .= "\n query word = \"$query_term\" "; $email_body .= "\n Checking for Common words: ";$dropping_word = "no"; if ($query_term eq "and") {$dropping_word = "yes"} if ($query_term eq "area") {$dropping_word = "yes"} if ($query_term eq "between") {$dropping_word = "yes"} if (substr($query_term,0,4) eq "burl") {$dropping_word = "yes"} if (substr($query_term,0,6) eq "compan"){$dropping_word = "yes"} if ($query_term eq "for") {$dropping_word = "yes"} if ($query_term eq "from") {$dropping_word = "yes"} if (substr($query_term,2,1) eq ".") {$dropping_word = "yes"} if ($query_term eq "the") {$dropping_word = "yes"} if (substr($query_term,0,6) eq "pictur"){$comments.="\"$word\" changed to \"photo\". ";$query_term="photo"} if ($query_term eq "vermont") {$dropping_word = "yes"} if (substr($query_term,0,2) eq "vt") {$dropping_word = "yes"} $email_body .= "$dropping_word"; if ($dropping_word eq "yes") { $words_dropped+=1;$terms_dropped.="$word ";$common_words.="$word ";$query_term=""; }; $email_body .= " $common_words \n Checking for question words (like are, can): ";$question_starter="no"; if ($counter eq 1) { if ($query_term eq "are") {$question="likely";$question_starter="yes"} if ($query_term eq "can") {$question="likely";$question_starter="yes"} if ($query_term eq "do") {$question="likely";$question_starter="yes"} if ($query_term eq "has") {$question="likely";$question_starter="yes"} if ($query_term eq "have") {$question="likely";$question_starter="yes"} if ($query_term eq "how") {$question="likely";$question_starter="yes"} if ($query_term eq "is") {$question="likely";$question_starter="yes"} if ($query_term eq "what") {$question="likely";$question_starter="yes"} if ($query_term eq "who") {$question="likely";$question_starter="yes"} if ($query_term eq "train") {$question="maybe not"} } $email_body .= "$counter $question"; if ($question_starter eq "yes") { $words_dropped+=1;$terms_dropped.="$word ";$unlikely_terms.="$word ";$email_body.="$word "; $query_term="";$question="likely"; } $email_body .= " $unlikely_terms \n Checking for other unlikely terms: ";$term_likely="yes"; if ($query_term eq "cost") {$term_likely = "no"} if ($query_term eq "directory") {$term_likely = "no"} if ($query_term eq "doe") {$term_likely = "no"} if ($query_term eq "happening") {$term_likely = "no"} if ($query_term eq "job") {$term_likely = "no"} if ($query_term eq "like") {$term_likely = "no"} if ($query_term eq "many") {$term_likely = "no"} if ($query_term eq "much") {$term_likely = "no"} if ($query_term eq "number") {$term_likely = "no"} if ($query_term eq "phone") {$term_likely = "no"} if ($query_term eq "schedule") {$term_likely = "no"} if ($query_term eq "take") {$term_likely = "no"} if ($query_term eq "you") {$term_likely = "no"} $email_body.=$term_likely; if ($term_likely eq "no") { $words_dropped+=1;$terms_dropped.="$word ";$unlikely_terms.="$word ";$email_body.="$word "; $query_term=""; } $email_body .= " $unlikely_terms \n See if the search is for out of state: "; if ($query_term eq "ks" || $query_term eq "kansas") {$state.="Kansas "} if ($previous_word eq "new" && $query_term eq "york") {$state.="New York"} $email_body .= "\n state = $state. Does " . substr($uri,0,27) . "= /travel-and-transportation/ "; if (substr($uri,0,27) eq "/travel-and-transportation/") { $state = ""; if ($query_term eq "downtown") { $terms_dropped.="$query_term ";$unlikely_terms.="$query_term ";$query_term=""; $comments.="\n term \"downtown\" removed -- unlikely & common in Travel & Transportation category. "; $email_body.="\n $comments "; } }; $email_body .= "\n state = $state...previous_word=$previous_word...name=$query_term"; $email_body .= "\n length of $query_term is " . length($query_term); if (length($query_term) > 0 && length($query_term) < 3){$terms_dropped .="$query_term ";$common_words.="$query_term ";$query_term=""} $email_body .= "\n After dropping words less than 3 characters, we are left with $query_term"; $email_body .= " $query_term\"\n dropped words = \"$terms_dropped\" "; if ($query_term ne ""){$query_terms .= "$query_term ";$email_body .= "\n query_terms = \"$query_terms\" \n \n ";} if ($value1 eq "s" && $query_term ne "") { $alt_terms .= "$value2 "; $apostrophe .= "$value2\'$value1 "; $plural = "yes" } else {$alt_terms .= "$query_term "; $apostrophe .= "$query_term " }; if ($query_term eq "milton"){$town.="milton "} } $email_body .="\n\n\n\n Count the words in in the query phrase $query_terms (if there are any): "; # split name-value pairs # print " \"$query_terms\""; local(@pairs) = split(/\ /, $query_terms); $word_count=0;$query_terms=""; foreach $pair (@pairs) { ($query_term, $value) = split(/\ /, $pair); $FORM{$query_term} .= $value; # print "\"$query_term\", "; if ($query_term ne "") { $word_count+=1; $query_terms .= "$query_term "; } $email_body .= " $word_count, "; } # print " \"$query_terms\""; local(@pairs) = split(/\ /, $query_terms); $word_count=0;$query_terms=""; foreach $pair (@pairs) { ($query_term, $value) = split(/\ /, $pair); $FORM{$query_term} .= $value; # print "\"$query_term\", "; if ($query_term ne "") { $word_count+=1; $query_terms .= "$query_term "; $displayed_terms .= "\"$query_term\" "; } $email_body .= " $word_count, "; } $email_body.="\n If the only query_term is 'pizza', drop $query_terms."; if (substr($uri,0,12) eq "/food/pizza/" && $query_terms eq "pizza") { $comments .= "\"$query_terms\" term dropped, as all records in this category are about $query_terms. "; $terms_dropped.="$query_terms ";$common_words.="$query_terms ";$query_terms="";$word_count=0;$email_body.="\n $comments "; } $email_body.="\n If the query_term is 'public transportation', drop \"$query_terms\"."; if ($query_terms eq "public transportation ") { $comments .= "\"$query_terms\" term dropped, as all records in this category are about $query_terms. "; $terms_dropped.="$query_terms ";$common_words.="$query_terms ";$query_terms="";$word_count=0;$email_body.="\n $comments "; } print ", huh? $comments"; $email_body.="\n If this is about another state ($state), tell user we don't have anything about it...."; if ($state ne ""){print " This web site doesn't have anything about $state."} $email_body.="\n If this is about another town ($town), tell user we don't have anything about it...."; if ($town ne ""){print " This web site doesn't have much about $town."} if ($question eq "likely") { print qq^ $comments The chances of me finding that question is not very likely. If I were to remove the words $terms_dropped, the chances improve. But, by how much? If you want me to do a search, please enter a few significatant key words for me to look for in the search box below. That is what search engines really look for: KEY-WORDS. I can't interpret question, but I can be programmed to recognize unlikely terms: \"$unlikely_terms\" If you are not familiar with using keywords, You could try the using the other words as Key-words: "$query_terms" For best results, try to use no more than 3 (or at most 4) keywords.^; if ($state ne ""){print "This web site doesn't have anything about $state."} if ($town ne "") {print "This web site doesn't have much about $town."} print " | ||
Let's drop the "}; if ($common_words ne ""){print "common words ($common_words) "}; if ($common_words ne "" && $unlikely_terms ne ""){print "and "}; if ($unlikely_terms ne ""){print "Unlikely terms ($unlikely_terms)"}; if ($terms_dropped ne ""){print ", leaving us with $word_count word(s)."}; if ($common_words ne "") { if ($word_count eq 0) { print "
Scroll down to view links.
"; } else { print qq|
The reason I don't search on common words: During the "and" search (all search-words must be present in the record for it to be displayed.), any record that has "$query_terms" in it, but not common word(s) "$common_words", would not be displayed; and, a lot of records do not have unneccessary common words in them, because the words are assumed. And, if I didn't find anything with all those words in it, I would do an "or" search. During the "or" search (any search-word in can be present in the record for it to be displayed), So, I would be displaying everything with the common word(s) "$common_words" in it, and we get an "Too many common word(s) error", as too many (or even most) of the records come back as hits. |;} } if ($word_count gt 0){print "
Searching for $word_count word";} if ($word_count gt 1){print "s";} if ($word_count gt 0){print " $displayed_terms ";} if ($word_count eq 2){print "(Both words must be in the record, for the record to be displayed.)"; } if ($word_count gt 2){print "(All $word_count words must be in the record, for the record to be displayed.)"; } } } if ($query_terms eq "" && $terms_dropped eq ""){print " what? "} if ($question ne "likely") { print qq^
Do you see this message near the top of your browser, when you click on the links?
When you click on a link in my directories, the web site you are requesting will be opened in a separate window or tab. This worked great until version six. Unfortunately, many web sites will open windows with advertisements and junk that you don't want. So Internet Explorer is asking you if you really requested that information or web site -- or is this web site just trying to force feed it to you? This web site does NOT open up pop-ups with ads or porn, here. I open up the web sites you request in a separate window or tab as a convenience. For best results, I recommend clicking on the
If you do this I will be able to open the web pages as you request them.
| If a link is no longer clickable, it is probably a temporary link that has expired or whose content has changed. Red Links have been found to be unavailable. The web site might have been removed, had its name changed, or is temporarily unavailable. To be a featured web site, you must be a most 10 requested web site of your category -- or, be cross-linked to this web site. Both incoming and outgoing traffic is measured on all web sites. Web sites are listed in the following order, 1. web sites added within the last 7 days in alphabetical order, 2. The top-ten (featured or popular) web sites in alphabetical order, and 3. remaining web site in alphabetical order. |
/category-search.cgi?query=$search_terms&type=keyword&bool=or\" width=100% height=50000 marginwidth=0 marginheight=0
align=center hspace=0 vspace=0 frameborder=0 scrolling=no>
@;
} else {
print qq@
|
@;
} else {print qq@
@;
};
print qq^
^; }; foreach $pair (@pairs) { ($browser, $value) = split(/\//, $pair); $browser_type .= "$browser "; $email_body .= "\n Unknown piece = $browser_or_crawler "; } # split name-value pairs local(@pairs) = split(/\ /, $browser_type); $browser_or_crawler = "unknown agent"; foreach $pair (@pairs) { ($browser, $value) = split(/\ /, $pair); if ($browser eq "AppleWebKit"){$browser_or_crawler="mobile";}# if ($browser eq "Babya"){$browser_or_crawler="browser";}# http://www.softpedia.com/get/Internet/Browsers/Babya-Discoverer.shtml if ($browser eq "BecomeBot"){$browser_or_crawler="crawler";}# http://www.become.com/site_owners.html if ($browser eq "CazoodleBot"){$browser_or_crawler="crawler";}# CazoodleBot Crawler; http://www.cazoodle.com/cazoodlebot if ($browser eq "Charlotte"){$browser_or_crawler="crawler";}# http://www.searchme.com/support if ($browser eq "contype"){$browser_or_crawler="media player";}# http://www.searchme.com/support if ($browser eq "Crawler"){$browser_or_crawler="crawler";}# http://www.searchme.com/support if ($browser eq "FunWebProducts"){$browser_or_crawler="browser";}# Browser addon for MSIE - with its own spyware package. if ($browser eq "ia_archiver"){$browser_or_crawler="crawler";}# http://www.alexa.com/site/help/webmasters if ($browser eq "Firefox"){$browser_or_crawler="crawler";}# http://www.flarp.net/misc/indylib.php if ($browser eq "Gecko"){$browser_or_crawler="mobile";}# if ($browser eq "Indy"){$browser_or_crawler="crawler";}# http://www.flarp.net/misc/indylib.php if ($browser eq "Jeeves"){$browser_or_crawler="crawler";}# http://about.ask.com/en/docs/about/webmasters.shtml if ($browser eq "KHTML"){$browser_or_crawler="mobile";}# http://about.ask.com/en/docs/about/webmasters.shtml if ($browser eq "lwp-trivial"){$browser_or_crawler="crawler";}# MicroSoft Internet Explorer if ($browser eq "MSIE"){$browser_or_crawler="browser";}# MicroSoft Internet Explorer if ($browser eq "PrivacyFinder"){$browser_or_crawler="browser";}# www.safexplorer.com/ if ($browser eq "robot"){$browser_or_crawler="crawler";}# http://www.picsearch.com/bot.html if ($browser eq "QuickTime"){$browser_or_crawler="media player";}# http://www.searchme.com/support if ($browser eq "SAFEXPLORER"){$browser_or_crawler="browser";}# www.safexplorer.com/ if ($browser eq "Slurp"){$browser_or_crawler="crawler";}# http://help.yahoo.com/help/us/ysearch/slurp if ($browser eq "StackRambler"){$browser_or_crawler="crawler";}# http://www.janetsystems.co.uk/Default.aspx?tabid=82&itemid=721 if ($browser eq "TurnitinBot"){$browser_or_crawler="crawler";}# Plagiarism Prevention http://www.turnitin.com if ($browser eq "VoilaBot"){$browser_or_crawler="crawler";}# http://www.voila.com/ if ($browser eq "WebAlta"){$browser_or_crawler="crawler";}# http://www.webalta.net/ru/about_webmaster.html if ($browser eq "WML"){$browser_or_crawler="mobile";}# http://about.ask.com/en/docs/about/webmasters.shtml if ($browser eq "XHTML-MP"){$browser_or_crawler="mobile";}# http://about.ask.com/en/docs/about/webmasters.shtml if ($browser eq "ysearch"){$browser_or_crawler="crawler";}# http://help.yahoo.com/help/us if (substr($browser, 3) if (substr($browser,0, 3) eq "bot"){$browser_or_crawler="crawler";}# http://search.msn.com/msnbot.htm if (substr($browser,0, 7) eq "crawler"){$browser_or_crawler="crawler";}# http://search.msn.com/msnbot.htm if (substr($browser,0, 9) eq "Googlebot"){$browser_or_crawler="crawler";}# # http://www.google.com/bot.html if (substr($browser,0, 6) eq "msnbot"){$browser_or_crawler="crawler";}# http://search.msn.com/msnbot.htm if (substr($browser,0,14) eq "vertical-crawl"){$browser_or_crawler="crawler";}#(Yahoo-Test/4.0; if (substr($browser,0,20) eq "Windows-Media-Player"){$browser_or_crawler="media player";}# $email_body .= "\n $browser_or_crawler piece = $browser"; $e_subject = "$uri not found by $browser_or_crawler"; } if ($browser_or_crawler eq "crawler") {$email_body .= "\n\n this is a web crawler. Aborting. ";exit;} if ($browser_or_crawler eq "media player") {$email_body .= "\n\n this is a media player. Aborting.