$options = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type:application/x-www-form-urlencoded;charset=UTF-8', 'content' => $stringData//需要获取的内容 ), // 解决SSL证书验证失败的问题 "ssl"=>array( "verify_peer"=>false, "verify_peer_name"=>false, ) ); $context = stream_context_create($options); $data = file_get_contents($url, false, $context);