Re: [PHP] file_get_contents and https



On 5/31/07, Stut <stuttle@xxxxxxxxx> wrote:

Bob Hanson wrote:
> Thanks, Jay.
>
> I tried it first with a simple "http://"; call, and that worked fine. So
> unless "https:..." requires something additional in the way of
> arguments, that doesn't seem to be the issue.
>
> I'm hoping someone who has done this remembers what special installation
> issues there might be. When I look on the web I see lots of discussion,
> but it's pretty hard to figure out how much of it is currently
> applicable and how much of it is ancient history.

Was PHP built with openssl enabled? If not, that's ya problem.


phpinfo() is your friend.

-Stut

> Jay Blanchard wrote:
>
>> [snip]
>> 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...
>> [/snip]
>>
>> The warning that you get is "Invalid argument..." Have you read
>> http://us2.php.net/file_get_contents to make sure that you are
including
>> all needed arguments?
>>
>>
> The URL for file_get_contents doesn't give many clues to its use with
> https.


David

Relevant Pages

  • stuttering john interview
    ... Now you've transitioned from "Stuttering John" on the Stern show to ... Jay is one of the greatest guys. ... in Las Vegas so we were trying to go to Vegas and get a hotel room, ... writer is a good friend. ...
    (alt.fan.howard-stern)
  • Re: Jay Hays RIP
    ... Jay is a Vietnam Veteran who used to ... He tried to use alcohol to fix himself for a whole lot of years. ... It took Jay forty years to graduate, but he did it and I'm so proud of him. ... A mutual friend was with him at the end and Jay ...
    (alt.gathering.rainbow)
  • Re: Jay Hays RIP
    ... Jay is a Vietnam Veteran who used to ... He tried to use alcohol to fix himself for a whole lot of years. ... ran into people I vaguely recognized from those days at Oh My God Hot ... there, please call a friend, go to a meeting, or plant a tree. ...
    (alt.gathering.rainbow)
  • Jay Adkisson: Out of control
    ... I was witness to the psychotic behavior of one Jay ... No sooner than my friend had gotten off of the phone, Jay Adkisson himself ... Delta Tau Delta! ...
    (misc.taxes)
  • Re: The Most Expensive Ironing Boards in the World...
    ... if Jay calls his friend, ... and then the friend decides to fly there rather than drive, ... friend can argue that flying was incidental to the business of transporting ...
    (rec.aviation.piloting)