Answers for "file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:"

PHP
2

php file_get_contents disable ssl check

<?php
$arrContextOptions=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);  

$response = file_get_contents("https://maps.co.weber.ut.us/arcgis/rest/services/SDE_composite_locator/GeocodeServer/findAddressCandidates?Street=&SingleLine=3042+N+1050+W&outFields=*&outSR=102100&searchExtent=&f=json", false, stream_context_create($arrContextOptions));

echo $response; ?>
Posted by: Guest on May-05-2020
1

PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:

$options=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);  
$r = file_get_contents("https://yoursite.com/", false, stream_context_create($options));
Posted by: Guest on February-16-2021

Code answers related to "file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:"

Browse Popular Code Answers by Language