How can I add cookies when using cookie cookies in CURL?

I use php curl and I use a cookie jar for multi-step scanning. I need dynamically created cookies from the server.

But in one step, some cookies are created using javascript. Since curl does not run javascript, I need to add curl cookies at this point.

The only way I can do this is to manually read the cookie and set all the cookies plus the ones I want to use curl_Setoptand CURLOPT_COOKIE.

Is there a way to add cookies without losing existing ones?

+3
source share
1 answer

, cookie curl_setopt wit CURLOPT_COOKIE, cookie, , .

, CURLOPT_COOKIE.

, !

+2

Source: https://habr.com/ru/post/1762755/


All Articles