There is a website that I'm logged in , So there are cookies saved on my browser , I want to get these cookies.
I have tried CURL:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
//Save Cookies To cookie.txt .
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
//Use Cookie Saved In cookie.txt .
curl_setopt($curl, CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0');
curl_setopt($ch, CURLOPT_HEADER ,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$content = curl_exec($ch);
curl_close($ch);
But it doesn't work.
In the cookie.txt there is text like:
#HttpOnly_.website.com TRUE / TRUE 1681336501 gt_ab rn:ODUy
#HttpOnly_.website.com TRUE / TRUE 1681336501 gt_p id:Y2YxNDM3YjUtYjdlNC00YTc2LWE4ZjctYjFiOThkMWQ5NGZi
So is there is a way to make it work I get the cookies?