Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/06/2008, 04:56
santynavi
 
Fecha de Ingreso: junio-2008
Mensajes: 2
Antigüedad: 15 años, 11 meses
Puntos: 0
Respuesta: instruccion wget en PHP

hola... muchas gracias.. me faltaba ese el exec exactamente... no se si me puedas ayudar
el problema q tengo es q quisiera guardar en un string lo q obtengo del wget..

este es el codigo

<html>
<head>
<title>recherce de l'espert</title>
</head>
<body>
<?php
// Si existe la variable $_POST['muestra'] existe entonces muestra la comida favorita
//tendria q devolver el string
if (isset($_POST['analyse']))
{ $nom = $_POST['expert'];
$mani = $_POST['nick'];
$mado = $_POST['domin'];
$myurl = 'http://www.google.fr/search?as_q='.$nom.'&hl=fr&num=10&btnG=Recherche+G oogle&as_epq='.$mani.'%40'.$mado.'&as_oq=&as_eq=&l r=&cr=&as_ft=i&as_filetype=pdf&as_qdr=all&as_occt= any&as_dt=i&as_sitesearch=&as_rights=&safe=images' ;
$shell= exec("wget -O - \"$myurl\" &>/dev/null & echo \$!",$results,$status);
echo $salida = shell_exec($results);

} else {
//si no ha dado click en el boton
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>">
non de l'expert
<input type="text" name="expert" />
<br />
mail de l'expert
<input type="text" name="nick" />
@
<input type="text" name="domin" />
<br />
<input type="submit" name="analyse" value="Seguir" />
</form>

<?php

} //Fin del bloque else
?>

</body>
</html>