简体   繁体   中英

php curl reset or modify cookies

PHP-CURL: How the hell can I modify or delete cookies after calling curl_exec in existing curl object?

1) "Cookiejar" file is not saved on disk until curl_close()!

2) CURLOPT_COOKIE - can't help, just adding cookie with same name, not removing/editing older one.

3) CURLOPT_HTTPHEADER - setting "Cookie: " - can't help too!

I just need to edit or totally remove that cookies without closing - re-creating curl object =(

I think I had similar problem. Solution was cloning curl object with curl_copy_handle() and closing one of them (either original or clone). I'm not sure if this is useful for your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM