en windows funciona perfectamente, pero cuando copio el codigo a un servidor linux deja de guardarme el cookie, solo guarda la imagen
Código PHP:
if (!is_dir($tmppath))
mkdir($tmppath);
$fp = fopen($imagemtmp, w);
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookietmp);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_URL, $imagemurl);
curl_exec($ch);
curl_close($ch);
rewind($fp);
fclose($fp);
$img = $imagemtmp;
/*header("Content-Type: image/jpeg");
header("Content-Length: " . filesize($img));
@readfile($img);*/
bueno, las variables son path comunes y corrientes relativos a la posicion del doc