file() fails to read https
| From: | Mark Cain | Date: | Mon, 14 May 2001 23:58:21 +0000 |
| Subject: | file() fails to read https | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9320@lists.php.net to get a copy of this message | ||
I am writing php code on a Unix server which reads a call to Micro$oft SQL statement via asp on an
IIS server. I am using file() to get the results.
This works beautifully:
$fcontents = file ("http://www.domain.com/URLSearch.asp?Info=$info");
The results of the query are in $fcontents. Pretty standard php stuff.
However, when I make the same call on a secure connection (as in) ,
$fcontents = file ("https://www.domain.com/URLSearch.asp?Info=$info");
I get the following error message:
Warning: file("https://www.domain.com/URLSearch.asp?Info=$info")
- No such file or directory in /home/mysite/phplib/getinfo.php on line 4
The only change in the entire code is the "s".
Let me see if I can answer some questions before they are asked:
Yes. I am actually getting real content on the non-secure connection.
Yes. The secure connection is really functional on the other server. (I can actually cut the above
address and paste it into the address bar and get the results that I am expecting.)
So, my question is "How do I read this secure file?" No one even mentions https in the
file() function section of php.net.
Thanks,
Mark