file_get_contents and https



I am new to PHP; using Apache 2.2 and PHP 5/Windows. I'd like to do this:

$x = file_get_contents("https://user:pw@xxxxxxx";)

I get:

Warning: file_get_contents(https://...) [function.file-get-contents]: failed to open stream: Invalid argument in ... on line...

I think I have the following correct:

1) I have php_openssl.dll present and indicated as an extension in the ext directory
2) libeay32.dll is on the Windows path

What more do I need to do?

Thanks,


Bob Hanson


--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
.



Relevant Pages

  • Re: [PHP] file_get_contents and https
    ... Bob Hanson wrote: ... I am new to PHP; using Apache 2.2 and PHP 5/Windows. ... The warning that you get is "Invalid argument..." ...
    (php.general)
  • Re: [PHP] file_get_contents and https
    ... I am new to PHP; using Apache 2.2 and PHP 5/Windows. ... failed to open stream: Invalid argument in ... ... The warning that you get is "Invalid argument..." ...
    (php.general)
  • RE: [PHP] file_get_contents and https
    ... I am new to PHP; using Apache 2.2 and PHP 5/Windows. ... failed to open stream: Invalid argument in ... ... The warning that you get is "Invalid argument..." ...
    (php.general)
  • Re: if/else statement, form-check
    ... check if both are empty (invalid), ... Why doesn't PHP have an if/then/else way of doing things... ... As of now, I have chosen to have name, email and phonenumber as obligatory fields - they all get checked, and they all need input or the error-page displays. ... you are looking for flexible input validation scheme based upon an arbitrary set of values where some values have an 'either of' relationship. ...
    (comp.lang.php)
  • Re: Can not open url using fopen or file
    ... I got an error: failed to open stream: Permission denied. ... The above script works on my windows pc, but does not work on Linux ... (Fedora 5, php v5.1.2). ... Any possibility for firewall or other configuration issues? ...
    (comp.lang.php)