$newLogUrl = SERVER URL PATH
$opt = array('http' => array(
'method' => "POST",
'header' => 'Content-type: application/json',
'content' => $jsonCredenObj,
'timeout' => 4));
$context = stream_context_create($opt);
$response = file_get_contents($newLogUrl,false,$context);
The above code is working in the normal http but not working in the secure server https
The Error
Warning: file_get_contents(): failed to open stream: HTTP request failed! HTTP/1.1 405 Method Not Allowed