Bug #67743 [Nab]: file_get_contents get some url file error

From: Date: Wed, 06 Aug 2014 00:48:40 +0000
Subject: Bug #67743 [Nab]: file_get_contents get some url file error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186993@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67743&edit=1 ID: 67743 Updated by: requinix@php.net Reported by: skadon at 163 dot com Summary: file_get_contents get some url file error Status: Not a bug Type: Bug Package: Unknown/Other Function Operating System: Win32 PHP Version: 5.4.31 Block user comment: N Private report: N New Comment: Not sure what I can tell you except that if PHP is sending you to 127.0.0.1 then that's because something told it to. As one more thing to check, see what you get with print_r(dns_get_record("shjianbang168.1688.com")); print_r(get_headers("http://shjianbang168.1688.com/")); If that doesn't help then try a mailing list or online forum for more support. http://php.net/support.php Previous Comments: ------------------------------------------------------------------------ [2014-08-06 00:15:14] skadon at 163 dot com use "Mozilla Firefox" or "Internet Explorer" view "http://shjianbang168.1688.com/" is ok, but use file_get_contents("http://shjianbang168.1688.com/") is not same to the Firefox or IE. use PHP file_get_contents("http://shjianbang168.1688.com/") is same to "Firefox view http://127.0.0.1/"(I have localhost server, so i can test PHP script) ------------------------------------------------------------------------ [2014-08-06 00:04:24] skadon at 163 dot com D:\Documents and Settings\Administrator>ping shjianbang168.1688.com Pinging cn.split.1688.com [42.156.140.61] with 32 bytes of data: Reply from 42.156.140.61: bytes=32 time=35ms TTL=54 Reply from 42.156.140.61: bytes=32 time=30ms TTL=54 Reply from 42.156.140.61: bytes=32 time=36ms TTL=54 Reply from 42.156.140.61: bytes=32 time=36ms TTL=54 Ping statistics for 42.156.140.61: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 30ms, Maximum = 36ms, Average = 34ms ------------------------------------------------------------------------ [2014-08-05 17:27:23] requinix@php.net Then that's your problem: the domain name is resolving to 127.0.0.1. Fix that and it should start working for you. ------------------------------------------------------------------------ [2014-08-05 15:41:23] skadon at 163 dot com function file_get_contents Unable to resolve the domain name such as "abc123.1688.com",it's resolve to 127.0.0.1 ------------------------------------------------------------------------ [2014-08-02 03:07:57] requinix@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=67743 -- Edit this bug report at https://bugs.php.net/bug.php?id=67743&edit=1

« previous php.bugs (#186993) next »