i using code test making connection curl:
$url = "https://www.google.com"; $ch = curl_init($url); curl_setopt($ch, curlopt_stderr, $fp); curl_setopt($ch, curlopt_certinfo, 0); curl_setopt($ch, curlopt_verbose, 1); curl_setopt($ch, curlopt_header, 0); curl_setopt($ch, curlopt_nobody, 1); curl_setopt($ch, curlopt_ssl_verifypeer, 0); curl_setopt($ch, curlopt_ssl_verifyhost, 0); curl_setopt($ch, curlopt_sslversion, 3); //curl_setopt($ch, curlopt_connecttimeout ,0); //curl_setopt($ch, curlopt_timeout, 400); //timeout in seconds $result = curl_exec($ch); curl_errno($ch)==0 or die("protocol sslv3 disabled.\n\nerror:".curl_errno($ch)." ".curl_error($ch)); fseek($fp, 0);//rewind $str=''; while(strlen($str.=fread($fp,8192))==8192); echo $str;
the output looks this:
* rebuilt url to: https://www.google.com/ * hostname not found in dns cache * trying 74.125.237.211... * connected www.google.com (74.125.237.211) port 443 (#0) * ssl connection using sslv3 / ecdhe-rsa-aes128-sha * server certificate: * subject: c=us; st=california; l=mountain view; o=google inc; cn=www.google.com * start date: 2015-04-08 14:16:31 gmt * expire date: 2015-07-07 00:00:00 gmt * issuer: c=us; o=google inc; cn=google internet authority g2 * ssl certificate verify result: unable local issuer certificate (20), continuing anyway. > head / http/1.1 host: www.google.com accept: */* < http/1.1 302 found < cache-control: private < content-type: text/html; charset=utf-8 < location: https://www.google.com.au/?gfe_rd=cr&ei=0fy_vd7pd8yn8qe80iei < content-length: 261 < date: tue, 28 apr 2015 09:45:52 gmt < server: gfe/2.0 < alternate-protocol: 443:quic,p=1 < * connection #0 host www.google.com left intact
i suppress information shown after ssl information. > head / http 1.1
, down don't want displayed.
any ideas on how can achieve this?
you have verbose parameter set 1. perhaps can set 0 , show output.
i looking how output verbose :)