Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/12/2013, 09:49
elnoidelcargol
 
Fecha de Ingreso: noviembre-2007
Mensajes: 16
Antigüedad: 16 años, 5 meses
Puntos: 0
Pregunta usar cUrl para loguear

buenas, estoy empezando con cUrl, y tengo unas dudas.

No entiendo la diferencia entre
curl_setopt ($ch, CURLOPT_URL, "") y
curl_setopt ($ch, CURLOPT_REFERER, "')

A continuación os paso mi código.


Código:
$cookie="cookie.txt"; 
$uagentutilitzat = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30";


$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, ""); 
curl_setopt ($ch, CURLOPT_VERBOSE, 1); 
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, $uagentutilitzat); 
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt"); 
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie); 
curl_setopt ($ch, CURLOPT_REFERER, "');
curl_setopt ($ch, CURLOPT_POSTFIELDS,'');
curl_setopt ($ch, CURLOPT_POST, 1);

Muchas Gracias !