Bug #67966 [Opn->Nab]: Use Linux wget,curl can get content,but php file_get_contents and cURL can't.

From: Date: Fri, 05 Sep 2014 12:07:00 +0000
Subject: Bug #67966 [Opn->Nab]: Use Linux wget,curl can get content,but php file_get_contents and cURL can't.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187429@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67966&edit=1 ID: 67966 Updated by: johannes@php.net Reported by: jifei at outlook dot com Summary: Use Linux wget,curl can get content,but php file_get_contents and cURL can't. -Status: Open +Status: Not a bug Type: Bug Package: cURL related Operating System: Linux PHP Version: 5.4.32 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Your URL gives me a blank result in m browser, too. Also mind when typing wget http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1&beginDate=2011-08-05&endDate=2014-09-05 the shell will split at the & which is a shell special character so what you doingwith that command is to fetch http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1 in the background and then try to execute beginDate=2011-08-05 and endDate=2014-09-05 as shell commands. Better escape it wget 'http://irm.cninfo.com.cn/ircs/interaction/irmInformationList.do?pageNo=1&beginDate=2011-08-05&endDate=2014-09-05' Nothing PHP releated here. Previous Comments: ------------------------------------------------------------------------ [2014-09-05 11:05:13] jifei at outlook dot com 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 this bug report at https://bugs.php.net/bug.php?id=67966&edit=1

« previous php.bugs (#187429) next »