09/04/2002, 21:49
|
| | | Fecha de Ingreso: septiembre-2001 Ubicación: En mi casa
Mensajes: 1.562
Antigüedad: 23 años, 2 meses Puntos: 0 | |
Re: Como buscar desde mi pagina cosas de un buscador? <script>
<!-- hide this script from non-JavaScript browsers
var MAX_ENGINES = 30;
var SNARK_STRING = "hunting+the+snark";
function MakeArray(n) {
for (var i = 1; i <= n; i++) {
this = 0;
}
this.maxlen = n;
this.len = 0;
return this;
}
var engs = new MakeArray(MAX_ENGINES);
function find_substring(needle, haystack) {
var i, needlen = needle.length, haylen = haystack.length;
for (i=0; i<=haylen-needlen; i++) {
if (needle == haystack.substring(i,i+needlen))
return i;
}
return false;
}
function Engine(name, opts, home, search) {
var snark = find_substring(SNARK_STRING, search);
this.name = name;
this.opts = opts;
this.home = home;
this.pre_snark = search.substring(0,snark);
this.post_snark= search.substring(snark+SNARK_STRING.length, search.length);
}
function Add(name, opts, home, search) {
engs.len++;
if (engs.len <= engs.maxlen) {
engs[engs.len] = new Engine(name, opts, home, search)
}
else {
alert("Better increase MAX_ENGINES: " + engs.len + ">" + engs.maxlen)
}
}
// ADD YOUR OWN SEARCH ENGINES BELOW. (See http://www.cs.cmu.edu/~jab/snark/ )
Add("Netnews: AltaVista", "",
"http://altavista.digital.com/",
"http://altavista.digital.com/cgi-bin/query?pg=q&what=news&fmt=d&q=hunting+t he+snark" );
Add("Shareware/Windows", "",
"http://vsl.cnet.com/",
"http://vsl.cnet.com/cgi-bin/vsl-master/Find?category=MS-Windows%28all%29&search=hunting+the+snark& logop=and&and=&orfile=++&hits=200" ; );
Add("the Web: AltaVista", "SELECTED",
"http://altavista.digital.com/",
"http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=d&q=hunting+th e+snark" );
Add("the Web: Lycos", "",
"http://www.lycos.com/",
"http://twelve.srv.lycos.com/cgi-bin/pursuit?query=hunting+the+snark" );
Add("the Web: Yahoo!", "",
"http://www.yahoo.com/",
"http://search.yahoo.com/bin/search?p=hunting+the+snark" ); |