phpbar.de logo

Mailinglisten-Archive

[php] AW: [php] Searchengine

[php] AW: [php] Searchengine

David Adler david.adler_(at)_h-tic.de
Sun, 20 Feb 2000 21:30:43 +0100


Hallo,

ich habe die Engine eigentlich schon selber programmiert, habe die ganzen
Linklisten durchgeguckt nichts gefunden.

<schnipp>

<?PHP

$SearchString  =  urlencode($SearchString);

if  ($SearchEngine  ==   "Altavista")

        if  ($SearchString  ==   "")

                Header(  "Location: http://www.altavista.com/");
                exit;
        }  else

                Header(  "Location:
http://www.altavista.com/cgi-bin/query?pg=q&what=web&q=$SearchString");
                exit;
        }


}  else  if  ($SearchEngine  ==   "Excite"  )

        if  ($SearchString  ==   "")

                Header(  "Location: http://www.excite.com/");
                exit;
        }  else

                Header(  "Location:
http://www.excite.com/search.gw?search=$SearchString");
                exit;
        }





}  else  if  ($SearchEngine  ==   "Lycos"  )

        if  ($SearchString  ==   "")

                Header(  "Location: http://www.lycos.com/");
                exit;
        }  else


                Header(  "Location:
http://www.lycos.com/cgi-bin/pursuit?cat=lycos&query=$SearchString");
                exit;
        }

}  else  if  ($SearchEngine  ==   "Metacrawler"  )

        if  ($SearchString  ==   "")

                Header(  "Location: http://www.metacrawler.com/");
                exit;
        }  else

                Header(  "Location:
http://www.metacrawler.com/crawler?general=$SearchString");
                exit;
        }


        }
}  else  if  ($SearchEngine  =="Yahoo"  )

        if  ($SearchString  =="")

                Header(  "Location: http://www.yahoo.com/");
                exit;
        }  else

                Header(  "Location:
http://search.yahoo.com/bin/search?p=$SearchString");
                exit;
        }

}

?>

<schnapp>

MfG

David



php::bar PHP Wiki   -   Listenarchive