php - 添加cookie到curl的cookiejar [英] php - add cookie to curl's cookiejar
本文介绍了php - 添加cookie到curl的cookiejar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能够将从javascript设置的Cookie添加到cookie jar中。有什么PHP功能吗?或者我应该使用fopen打开cookie jar并劫持它?
I'd like to be able to add cookies set from javascript into the cookie jar. Is there any PHP functions for this? or should i just open the cookie jar using fopen and hijack it?
推荐答案
无耻的插件:
您可以使用 Cookie Jar Writer 。
它是一个用于运行时编辑cURL的cookie jar文件的实用PHP类。
换句话说,它允许在cURL请求序列中向cookie
jar文件中添加自定义cookie变量。
It is an utility PHP class for runtime editing cURL's cookie jar file. In other words, it allows to add custom cookie variables to a cookie jar file within sequence of cURL requests.
这篇关于php - 添加cookie到curl的cookiejar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文