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

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

WBOY
Release: 2016-06-13 13:41:34
Original
913 people have browsed it

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template