Wednesday, March 16, 2011

Re: [Pro. PHP Dev.] FILE_GET_CONTENTS with SSL on XAMPP

I think you're going to need to add a stream wrapper for https since that is not setup by default for PHP. http is, but https is not. 

Read up on PHP streams and how to register/unregister stream wrappers. It's pretty simple, but is an excellent learning opportunity for you.

On Wed, Mar 16, 2011 at 12:32 PM, Charlie <shymathguy@gmail.com> wrote:

Hello All,

I am trying to use file_get_contents($url) under XAMPP to get the HTML
where $url starts with "https://ssl.companyname" and it says "failed
to open stream".  It works when $url starts with "http://
www.domain.com".  I read to remove the # in line "#LoadModule
ssl_module modules/mod_ssl.so" in file httpd.conf but it is already
removed.  Here are all references to "ssl" in this file:

LoadModule ssl_module modules/mod_ssl.so
. . .
#<IfModule ssl_module>
#    LoadModule log_sql_ssl_module modules/mod_log_sql_ssl.so
. . .
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random
equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

I know PHP programming but I don't know anything about SSL.

Thanks,

Charlie

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
 
For information or project assistance please visit :
http://www.360psg.com
 
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP@googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP