Bug #67966 [NEW]: Use Linux wget,curl can get content,but php file_get_contents and cURL can't.
| From: | jifei at outlook dot com | Date: | Fri, 05 Sep 2014 11:05:14 +0000 |
| Subject: | Bug #67966 [NEW]: Use Linux wget,curl can get content,but php file_get_contents and cURL can't. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187428@lists.php.net to get a copy of this message | ||
From: jifei at outlook dot com
Operating system: Linux
PHP version: 5.4.32
Package: cURL related
Bug Type: Bug
Bug description:Use Linux wget,curl can get content,but php file_get_contents and cURL can't.
Description:
------------
A link use PHP file_get_contents return null,Use Linux commend wegt or
linux curl is ok.Other link use file_get_contents is ok.Because the
link has special characters?
Test script:
---------------
PHP
<?php
//this is empty
echo
file_get_contents('http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1&beginDate=2011-08-05&endDate=2014-09-05');
//php cURL is also empty
//other link is ok
echo
file_get_contents('http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1');
?>
Linux
//this is ok
wget
http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1&beginDate=2011-08-05&endDate=2014-09-05
//this is ok
curl
http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1&beginDate=2011-08-05&endDate=2014-09-05
--
Edit bug report at https://bugs.php.net/bug.php?id=67966&edit=1
--