Home  >  Article  >  Backend Development  >  CURL函数能不能把cookie写入变量?该如何解决

CURL函数能不能把cookie写入变量?该如何解决

WBOY
WBOYOriginal
2016-06-13 10:12:271153browse

CURL函数能不能把cookie写入变量?
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');把cookie写入到文件中了,我希望用个变量存储cookie,难道还必须先写再读吗?

------解决方案--------------------
CURL没有提供将数据保存到变量的方法,那么也就不能了。当然你自己做个试验不是比什么都快么?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn