# SEARCH ENGINE PROCESSOR SCRIPT # # SCPT: multisearch.php # # DEVL: Marcus Kazmierczak, # marcus@mkaz.com # # DATE: July 1st, 1999 # # DESC: Multiple Search Engine in one Form # # Receives engine ($ engine ) and search criteria ($ scrit) # from a form and creates the proper search form and # submits it to the site specified # # * Works with GET or POST method # * Any amount of hidden fields # DEFINE SEARCH ENGINES # engine name = Action, Method, Criteria Field $ ENGINES = Array ("EXCITE" => Array ("http://www.excite.com/search.gw", "get", "search"), "altavista" => array ( "http://www.altavista.com/cgi-bin/query", "get", "q"), "Webster" => Array ("http://www.mw.com/cgi-bin/Dictionary "," Post "," va ")," yahoo "=> array (" http://search.yahoo.com/bin/search "," get "," p ")," interNic "=> array ( "http://www.networksolutions.com/cgi-bin/whois/whois" "post"" ")," google "=> array (" http://www.google.com/search ", "Get", "q"), "devsearch" => array ("http://www.devsearch.com/cgi-bin/query", "get", "q"), "DET "=> Array (" http://www.cgi/applogic "," research_quote_symbol ")," Hotbot "=> array (" http: // Www.hotbot.com/", "Get", "MT"), "Lycos" => Array ("http://www.lycos.com/cgi-bin/pursuit", "get", "query") , "askJEEVES" => array ("http://www.askjeeves.com/main/askjeeves.asp", "get", "
")," slashdot "=> Array (" http://www.slashdot.org/search.pl "," get "," query "," freshmeat "=> array (" http: // core. Freshmeat.net/search.php3", "post" "query"), "PHP" => array ("http://www.php.net/manual-lookup.php3", "post", "function" ), "infind" => Array ("http://www.infind.com/infind/infind.exe", "get", "query")); # define hidden fields # Engine name = "name" => "Value" $ hiddenfields = array ("altavista" => array ("pg" => "q", "what" => "Web", "KL" => "en"), "Webster" => array ( "Book" => "Dictionary"), "devsearch" => Array ("mss" => "en / simple", "pg" => "q", "what" => "web", "eNC" = > "ISO88591", "FMT" => "", "OP" => "a"), "DET" => Array ("infinty" => "DET_QUOTES"), "Hotbot" => array ("OPS "=>" MDRTP ")," Lycos "=> Array (" cat "=>" dir ")," askjeeves "=> array (" Origin "=>", "qsource" => "0", " Site_name "=>" jeeves "," Metasearch "=>" YES ")," infind "=> array (" time "=>" 10 ")); $ action = $ engines [$ engine] [0]; $ Method = $ ENGINES [$ ENGINE] [1]; $ criteriafield = $ engines [$ engine] [2];?>