Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/03/2005, 13:52
Avatar de urgido
urgido
 
Fecha de Ingreso: febrero-2005
Mensajes: 2.351
Antigüedad: 19 años, 1 mes
Puntos: 25
ayuda con este script

al siguiente script hace buskeda en diferentes buskadores pero los abre en la misma ventana kisierake los abriera en otra venta:

codigo:

<html>
<head>
<style type="text/css">
<!--
form { display:inline; }
button { display:inline; }
-->
</style>
</head>
<body>
<?php
// Results in same window or new window?
// script.php?t=b for new window, or leave blank for same
if (isset($_GET['t']) && ($_GET['t']!= 'b')) {
if ($_GET['t'] = 'b') {
$target = "_blank";
} else {
$target = "_parent";
}
} else {
$target = "_parent";
}
// Want submit buttons?
// script.php?s=1 for buttons, or leave blank for none
if (isset($_GET['s']) && ($_GET['s']!= '')) {
if ($_GET['s'] = '1') {
$submit = '<button type="submit">&larr;</button> &nbsp;&nbsp; ';
} else {
$submit = '';
}
} else {
$submit = '';
}
// Each variable defined here is selectable and orderable as it's own code chunk
// script.php?e=g.a for Google then AlltheWeb
$g = <<<EOF
<img src="google.gif" width="50" height="40">
<form method="GET" action="http://www.google.com/search" target="$target">
<input type="hidden" name="domains" value="Mafia-Latina.Org">
<input TYPE="text" name="q" size="9" maxlength="255" value="">
<input type="hidden" name="sitesearch" value="Mafia-Latina.Org">
$submit
</form>
EOF;
$y = <<<EOF
<img src="Yahoo.jpg" width="50" height="50">
<form method=get action="http://search.yahoo.com/search" target="$target">
<input type="text" name="p" size="8" value="">
<input type="hidden" name="fr" value="yscpb">
<input type="hidden" name="vs" id="ysvs1" value="Mafia-Latina.Org" />
$submit
</form>
EOF;
$a = <<<EOF
<img src="altavista.gif" width="50" height="50">
<form action="http://www.altavista.com/search" method="get" target="$target">
<input name="q" size="11" value="" />
<input type="hidden" name="advanced" value="1" />
<input name="cat" type="hidden" value="web" />
<input name="charset" type="hidden" value="iso-8859-1" />
<input type="hidden" name="dincl" value="Mafia-Latina.Org" />
$submit
</form>
EOF;
$b = <<<EOF
<form method="get" action="http://www.gigablast.com/search" target="$target">
<input type="hidden" name="sc" value="0" />
<input type="hidden" name="site" value="www.webmasterworld.com" />
<input type="text" name="q" size="11" value="Gigablast WW"/>
$submit
</form>
EOF;
$m = <<<EOF
<form method="get" action="http://beta.search.msn.com/results.aspx" target="$target">
<input type="hidden" name="cp" value="1252" />
<input type="text" name="q" size="11" value="Beta MSN WW" />
<input type="hidden" name="q1" value="site:webmasterworld.com" />
$submit
</form>
EOF;
if (isset($_GET['e']) && ($_GET['e']!= '')) {
$engines_requested = $_GET['e'];
$engine_array = explode(".",$engines_requested);
// print_r($engine_array);
for ( $q=0; $q < 5; $q++ ) {
echo $$engine_array[$q];
}
} else {
echo $g.$y.$a;
}
?>
</body>
</html>