Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/10/2006, 11:33
blackmaster52x
 
Fecha de Ingreso: septiembre-2006
Mensajes: 46
Antigüedad: 17 años, 6 meses
Puntos: 0
podes usar el motor de google para realizar las busquedas y luego mostras los datos como tu quieras...podes hacer algo asi con ajax:

google.php

<?php

class google
{

function searchG($data)
{
$data = urlencode(trim($data));
$query = file('aqui va el sitio de google con http, no me deja postear esto por que soy nuevo/search?q='.$data);

return $query[38];
}

}


if(isset($_GET['google']))
{

$google = google::searchG($_GET['google']);


if((string) $google !== null)
{
print_r($google);
}
else
{

echo '<h4>No se han encontrado resultados.</h4><p>Intentelo de nuevo.</p>';
}
}

?>

buscar.html

<html>
<head>
<script language="javascript" type="text/javascript">

var url = "google.php?google=";

var http = getXmlHttpObject();
function handleHttpResponse()
{
if (http.readyState == 4)
{
results = http.responseText;
document.getElementById('resultado').innerHTML = results;
}
}

function sendQuerystring()
{
searchV = document.getElementById("search").value;

http.open("GET", url + escape(searchV), true);

http.onreadystatechange = handleHttpResponse;

http.send(null);
}

function getXmlHttpObject()
{
var xmlhttp;

if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
{
try
{
xmlhttp = new XMLHttpRequest();
}
catch (e)
{
xmlhttp = false;
}
}

return xmlhttp;
}

</script>
</head>
<body>

<form action="post">
<p>
Buscar:
<input type="text" size="10" name="search" id="search" onblur="sendQuerystring();" />

</p>
</form>
<div id="resultado">
Null
</div>

</body>
</html>

---
Espero que te sirva esto.