public function get_cookie(){
header("Content-type:text/html;Charset=utf8");
$ch =curl_init();
curl_setopt($ch,CURLOPT_URL,'爬取网址');
$header = array();
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HEADER,true);
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
curl_setopt($ch,CURLOPT_COOKIE,'需要设置的cookie值');
$content = curl_exec($ch);
echo "<pre>";print_r(curl_error($ch));echo "</pre>";
echo "<pre>";print_r(curl_getinfo($ch));echo "</pre>";
echo "<pre>";print_r($header);echo "</pre>";
echo "</br>",$content;
}