Need response body of HTTP 500 with file_get_contents (PHP)

You might consider nusoap.

For your question though, it works if you use ignore_errors.

$context = stream_context_create(array(
    'http' => array(
        'ignore_errors' => true
     )
));

$contents = file_get_contents($url, false, $context);

Leave a Comment