Hi ! I am new here and also to curl .
One question :
why the curl does not save the cookis in the file :
This script is an example of using curl in php to log into on one page and
then get another page passing all cookies from the first page along with you.
If this script was a bit more advanced it might trick the server into
thinking its netscape and even pass a fake referer, yo look like it surfed
from a local page.
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
ob_start(); // prevent any output
curl_exec ($ch); // execute the curl command
ob_end_clean(); // stop preventing output
$cookie_contents = file_get_contents($cookie);
Received on 2009-07-07