<?php $cookie_file = 'cookies.txt'; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://www.costam.pl/home=cos"); curl_setopt($curl, CURLOPT_TIMEOUT, 10); curl_setopt($curl, CURLOPT_REFERER, "http://www.costam.pl/home=cos"); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_REFERER, "http://www.costam.pl/home=cos"); curl_setopt($curl, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'); 'Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7'); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_ENCODING, 'gzip'); curl_setopt($curl, CURLOPT_ENCODING, 'deflate'); curl_setopt($curl, CURLOPT_ENCODING, ''); /*curl_setopt($curl, CURLOPT_COOKIE, "puid=1226405558_35c807c4722a233f585514bbfcb08db5EVv1; stsess=e116c336eec798cc0e39a2b1e7745bebv2; __utma=82371138.3844287304869655000.1226405556.1226405556.1226405556.1; __utmb=82371138.1.10.1226405556; __utmc=82371138; __utmz=82371138.1226405556.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)");*/ curl_exec($curl); curl_close($curl); ?>
W momencie jak ustawiam recznie cookies to wszystko ładnie chodzi i jest dobrze (zakomentowany fragment). Problem pojawia sie tylko w momencie zewnetrznego odczytu z pliku.