All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server > Loadtest gatling.io knowledge

connect via ssl certificate with gatling.io and php

(1/1)

golfreeze:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url_ktb);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $input_xml);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

//Connected for SSL
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/CAcerts/cert.crt");

//if your website and cert will be http://www.packetlove.com/CAcerts/cert.crt

golfreeze:
##Reference site
https://curl.haxx.se/docs/sslcerts.html
http://php.net/manual/en/function.curl-setopt.php

นำร่อง

[0] ดัชนีข้อความ

Go to full version