note 95455 deleted from function.fopen by cmb
| From: | cmb@php.net | Date: | Sun, 09 Feb 2020 08:11:22 +0000 |
| Subject: | note 95455 deleted from function.fopen by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214040@lists.php.net to get a copy of this message | ||
Note Submitter: rene
----
if fopen() throws a E_WARNING "failed to open stream: HTTP request failed!" at you when
opening a valid URL that you know returns data, i advise you to do the following before calling
fopen($url,'r'):
<?php
ini_set ('user_agent', $_SERVER['HTTP_USER_AGENT']);
?>
or anyways, set that 'user_agent' with ini_set() to something valid.
thanks, pollita|at|php.net @ http://bugs.php.net/bug.php?id=22937#c64196 ,
for the clue to this