Home > php教程 > PHP源码 > body text

PHP CURL存储COOKIE

PHP中文网
Release: 2016-05-25 16:59:29
Original
993 people have browsed it

跳至

'admin',
	'password'=>'123'
);
$cookie = tempnam('./temp','cookie');
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_POST,count($data));
curl_setopt($curl,CURLOPT_POSTFIELDS,$data);
curl_setopt($curl,CURLOPT_COOKIEJAR,$cookie);
ob_start();
curl_exec($curl);
$result = ob_get_contents();
ob_end_clean();
curl_close($curl);
Copy after login

                   

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!