Reading Cookie when using Curl in php, how to?
问题 I am connecting to an API service which authenticates users using cookies. I make these two statements from command prompt and it works. curl -d "u=username&p=password" -c ~/cookiejar https://domain/login curl -b https://domain/getData Now I want to make two equivalent php files login.php and get_data.php using curl. I am using curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile); in login.php and curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile); in get_data.php It is not working. Cookie file is