我有一些cookies问题,我需要存储它,然后使用它,这是我的代码,但我不知道它为什么不存储它。
有什么错误吗?
$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, "http:\\www.domain.com");
curl_setopt ($ch, CURLOPT_VERBOSE, 0);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLINFO_HEADER_OUT,true);
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.txt");
curl_setopt ($ch, CURLOPT_REFERER, "http:\\www.domain.com");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS,'entradaDesde=AVISO_SEG_FIRMA&mensajeXML=&hojaEstilos=..%2F..%2FEstatico%2FComunesSEI%2FStyles%2Festilo_e.css&imagenes.flecha=flecha_e.gif');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$output=curl_exec($ch);
很多!