curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);//连接时把获得的cookie存为文件
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);//拿着这个cookie文件去访问
php 使用curl模拟登录discuz以及模拟发帖
https://www.cnblogs.com/tianxin2001x/archive/2009/10/28/1591311.html
curl请求常见出错排查
https://blog.csdn.net/l2x1314258/article/details/108815295