file_get_contents(http://cnh.local/dsc/uploads/1359e1e4c0a10294d9894146beb3e1e9.crt): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in file /opt/gitco/cnh_laravel/app/Repositories/CallRepository.php code example

Example: 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; ?>

Tags:

Php Example