Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/11/2011, 15:07
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: cURL obtener datos

Si pero tienes que conocer, por ejemplo si el script remoto fuera así:
Código PHP:
Ver original
  1. <?php
  2. // nombre a buscar
  3. $nombre = $_POST['nombre'];
  4.  
  5. // buscar con $nombre

Entonces en cURL tendríamos que pasar:
Código PHP:
Ver original
  1. <?php
  2. $ch = curl_init("http://www.mipagina.com/buscar.php");
  3. curl_setopt ($ch, CURLOPT_POST, 1);
  4. curl_setopt ($ch, CURLOPT_POSTFIELDS, "nombre=juan");
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
  6. curl_exec ($ch);
  7. curl_close ($ch);

Ya que el script espera el parámetro de nombre en el POST, así lo tienes que hacer por cada campo que quieras buscar.

Saludos.