karthikeyan_coder Posted January 17, 2007 Share Posted January 17, 2007 Hello, I am using Apache/2.0.55 (Win32) PHP/5.1.2.[code]file_get_contents("https://somedomain.com");[/code]returns a Warning[code][function.file-get-contents]: failed to open stream: Invalid argument in D:\wamp\www\dev\file_get_contents.php on line 6[/code]it gets well from http. but not from https Link to comment https://forums.phpfreaks.com/topic/34617-file_get_contentshttpssomedomaincom-not-working/ Share on other sites More sharing options...
johnwayne77 Posted January 17, 2007 Share Posted January 17, 2007 try to surf https://somedomain.comdoes it asks you to press enter or ok or something to confirm some secure session or anything like that?maybe that's why php can't fetch the content -- it encounters a dialog box and doesn't know what to dothat's my guess as you're saying it works fine with http Link to comment https://forums.phpfreaks.com/topic/34617-file_get_contentshttpssomedomaincom-not-working/#findComment-163209 Share on other sites More sharing options...
karthikeyan_coder Posted January 17, 2007 Author Share Posted January 17, 2007 let us say i am trying to get yahoo.com or hotmail.com ... Link to comment https://forums.phpfreaks.com/topic/34617-file_get_contentshttpssomedomaincom-not-working/#findComment-163237 Share on other sites More sharing options...
karthikeyan_coder Posted January 17, 2007 Author Share Posted January 17, 2007 i mean ssl version of yahoo/msn Link to comment https://forums.phpfreaks.com/topic/34617-file_get_contentshttpssomedomaincom-not-working/#findComment-163238 Share on other sites More sharing options...
leoe Posted April 17, 2007 Share Posted April 17, 2007 Hello, I'm new posting here, I was having the same problem, and I've fixed it loading the openssl php extension.[code]<?phpif (!extension_loaded('openssl')) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { dl('php_openssl.dll'); } else { dl('openssl.so'); }}?>[/code] Link to comment https://forums.phpfreaks.com/topic/34617-file_get_contentshttpssomedomaincom-not-working/#findComment-231292 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.