|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67966 Use Linux wget,curl can get content,but php file_get_contents and cURL can't.
Submitted: 2014-09-05 11:05 UTC Modified: 2014-09-05 12:06 UTC
From: jifei at outlook dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.4.32 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jifei at outlook dot com
New email:
PHP Version: OS:


 [2014-09-05 11:05 UTC] jifei at outlook dot com
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:

//this is empty
echo file_get_contents('');

//php cURL is also empty 

//other link is ok
echo file_get_contents('');


//this is ok

//this is ok


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-05 12:06 UTC]
-Status: Open +Status: Not a bug
 [2014-09-05 12:06 UTC]
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 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


the shell will split at the & which is a shell special character so what you doingwith that command is to fetch in the background and then try to execute beginDate=2011-08-05 and endDate=2014-09-05 as shell commands. Better escape it

wget ''

Nothing PHP releated here.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Mar 04 07:01:26 2021 UTC