I'm trying to parse some data from cite. One of the necessary parameters is cookie value, more precisely, the next values of it:
Cookie: ipp_uid2=efliElW4ac8ZN1ij/Z/HcwOZTR8GjhSAoyZq96A==;
ipp_uid1=1551805782684; ipp_key=v1551805782684/v3394bd6affd4485fec9704163aeca6afa04ab3/GUF3kfsYsBwa3cRGpzpV2g==;
I got this from incognito in google chrome "by hand". It changes every hour and I want to get it automatically. Without these values curl query doesn't work.
How can i get theese values by using curl or maybe other ways automatically?
The query code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $task);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Cookie: ipp_uid2=efliElW4ac8ZN1ij/Z/HcwOZTR8GjhSAoyZq96A==; ipp_uid1=1551805782684; ipp_key=v1551805782684/v3394bd6affd4485fec9704163aeca6afa04ab3/GUF3kfsYsBwa3cRGpzpV2g==;",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$server_output = curl_exec($ch);
echo $server_output;
curl_close ($ch);