Using file_get_contents in PHP - SOLVED

oldteacher

Active member
Wondering if there is another setting I am missing. Attempting to use file_get_contents and https://

Working fine with http:// but not https://. I am loading content from a server, not localhost.

I have set the following in php.ini:

allow_url_fopen = on
allow_url_include = on

I compiled the extension php_openssl.dll into my EXE.

No luck. Extensive search on net and stackoverflow and seems I have correctly setup php.ini and extension.

Any ideas?

Thanks
 
Last edited by a moderator:
php_openssl.dll requires the same DLL dependencies as php_curl.dll, so the best is to include php_curl.dll and all DLLs as shown below:


Pasted image674×462 23.9 KB


file_get_contents will then work fine with https://
 

Attachments

  • blob.png
    blob.png
    23.9 KB · Views: 0
Thank you, that worked. I “assumed” that when compiling php_openssl.dll into exe it would include all the others needed. Another lesson learned.

Thanks again for walking me through.
 
Back
Top