Jeżeli dodam obsługę cookie do kodu, w którym pobieram obrazek to dostaję w outpucie: obrazek xxx nie może zostać wyświetlony...
<?php $agent = 'Mozilla/5.0 (X11; U; Linux i686; en-US)'; $curl = curl_init(); curl_setopt( $curl, CURLOPT_URL, 'xxxxxxxxx' ); curl_setopt( $curl, CURLOPT_REFERER, 'http://www.mechanik.civ.pl' ); curl_setopt( $curl, CURLOPT_USERAGENT, $agent ); curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $curl, CURLOPT_COOKIE, 1 ); curl_setopt( $curl, CURLOPT_COOKIEJAR, COOKIE ); curl_setopt( $curl, CURLOPT_COOKIEFILE, COOKIE ); curl_setopt( $curl, CURLOPT_HTTPPROXYTUNNEL, TRUE ); curl_setopt( $curl, CURLOPT_PROXY, $proxies[0]['ip'] . ':' . $proxies[0]['port'] ); $codepage = curl_exec( $curl ); curl_close( $curl ); ///// $ch = curl_init( 'xxxxxxxxxxxxxxx' ); if( !$ch ) { } curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_COOKIESESSION, true); //jesli usune te linijki to nie ma problemu z blednym obrazkiem ale sesja sie nie zachowuje curl_setopt($ch, CURLOPT_COOKIE, 1 ); //ta linia tez curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIE); curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIE); $data = curl_exec($ch); curl_close($ch); ?>