Any way to keep curl's cookies in memory and not on disk

前端 未结 6 512
-上瘾入骨i
-上瘾入骨i 2020-12-01 09:09

I\'m doing some cURL work in php 5.3.0.

I\'m wondering if there is any way to tell the curl handle/object to keep the cookies in memory (assuming I\'m reusing the sa

6条回答
  •  眼角桃花
    2020-12-01 09:42

    If using Linux, you could set these to point somewhere within /dev/shm .. this will keep them in memory and you can be assured that they won't persist across re-boots.

    I somehow thought that Curl's cleanup handled the unlinking of cookies, but I could be mistaken.

提交回复
热议问题