cURL? is a simple and supprot cookie.
Edit 19.1 - Here is an example
$ ch = curl_init ();
curl_setopt ($ ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
CURLOPT_COOKIEJAR - , cURL cookie, , CURLOPT_COOKIEFILE - cURL ( , cookie).
- cookie ( CURLOPT_HEADER "1" - $output) cookie CURLOPT_COOKIE ( cookie foo = bar; bar = foo; ')
. libcurl php.ini