curl/openssl configuration for php under windows

'Testing OpenSSL with fopen()' tutorial was cited in an efexare.com blog article in 2017.

The Testing OpenSSL with fopen() tutorial was cited in an efexare.com blog article in 2017.

Subject: curl/openssl configuration for php under windows.
Date: Jan 3, 2017
Author: efexare.com 
Source: http://www.efexare.com/2017/01/

CA root certificate configuration for openssl & curl when via php on windows. 
curl is used by wordpress, and openssl is used by whmcs.

this is how to enable CA root cert bundles for openssl & curl for php on 
windows. i used web platform installer to install php version 5.6.24 & 7.0.9.

note, the openssl.cafile parameter in php.ini is only for php version 5.6 and 
above.

...
test with OpenSSL_HTTPS_fopen_with_CA.php

<?php # OpenSSL_HTTPS_fopen_with_CA.php
#- Copyright (c) 2011, HerongYang.com, All Rights Reserved.
#

$url = 'https://www.google.com';
$context = stream_context_create(array('ssl' => array('verify_peer' => true)
));

#var_dump(openssl_get_cert_locations());

$handle = fopen($url, 'r', false, $context);
while ( ($line = fgets($handle)) !== false) {
  echo "$line\n";
}
?>

if the website looks like google, it’s working.

...

Table of Contents

 About This Book

Reference Citations in 2017

curl/openssl configuration for php under windows

 [RESOLVED] Corrupt dll

 13 Memories Everyone Who Made Mix CDs

 System property javax.xml.soap.MessageFactory

 Add inline image in Rmarkdown

 Enhanced SHA-1 on Parsing Method and Message Digest Formula

 DARE Algorithm: A New Security Protocol

 如何强制java服务器只接受tls 1.2并拒绝tls 1.0和tls 1.1连接

 WSDL คืออะไร WSDL คือ เอกสารข้อมูลของ web service

 Tehnologii Web - securitatea aplicațiilor Web

 在Java中,SSL和TLS的区别及其用法

 Nejde se připojit na youtube

 SOAP response error to source

 Read UTF-8 encoded text content inside table cell

 unicode - BOM이없는 UTF-8과 UTF-8의 차이점은 무엇입니까?

 Cách để Xem tập tin XML

 DIFERENÇA ENTRE VIEW E VIEWGROUP NO ANDROID

 τεχνολογιών NFC και QR-code σε πλατφόρμες Android

 Reference Citations in 2016

 Reference Citations in 2015

 Reference Citations in 2014

 Reference Citations in 2013

 Reference Citations in 2012

 Reference Citations in 2011

 Reference Citations in 2010

 Reference Citations in 2009

 Reference Citations in 2008

 Reference Citations in 2007

 Reference Citations in 2006

 Reference Citations in 2005

 Reference Citations in 2004

 Reference Citations in 2003

 PDF Printing Version