file_get_contents icon indicating copy to clipboard operation
file_get_contents copied to clipboard

Secure wrapper for accessing HTTPS resources with file_get_contents() for PHP 5.3+.

Results 5 file_get_contents issues
Sort by recently updated
recently updated
newest added

https://github.com/composer/composer/issues/3204

help wanted

in: https://github.com/padraic/file_get_contents/blob/master/src/Humbug/FileGetContents.php#L104 the ssl option 'CN_match' is set for PHP versions below 5.6.0, however when file_get_contents is used, for example to fetch a download from github, and the download url...

PHP 5.x

For PHP versions >= 5.6 an empty context is passed to file_get_contents. See https://github.com/padraic/file_get_contents/blob/master/src/function.php#L29 Is this correct? Could you elaborate why CN_match is set for PHP versions less than 5.6...

Github has a certificate that matches multiple domains. PHP versions less than 5.6 will not be able to handle this properly with a stream context. The only solution for this...

PHP 5.x