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 PHP :
$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(); [B]curl_setopt ($ch, CURLOPT_URL, ""); [/B] 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); [B]curl_setopt ($ch, CURLOPT_REFERER, "');[/B] curl_setopt ($ch, CURLOPT_POSTFIELDS,''); curl_setopt ($ch, CURLOPT_POST, 1);
Muchas Gracias !