PHP CURL cookies

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:24:291139browse

php的curl扩展,在手册中有示例。先把cookie保存到一个文件,然后在curl中引用这个文件就可以了。
取cookie的参数是:

curl_setopt ( $ch, CURLOPT_COOKIESESSION, true );
curl_setopt ( $ch, CURLOPT_COOKIEJAR, $cookieFile);

发送cookie的关键是:
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookieFile);

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