开发者

php curl reset or modify cookies

开发者 https://www.devze.com 2023-02-08 09:33 出处:网络
PHP-CURL: How the hell can I modify o开发者_开发问答r delete cookies after calling curl_exec in existing curl object?

PHP-CURL: How the hell can I modify o开发者_开发问答r 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号