On shell-PHPcentos, file_get_contents returns false when obtaining the domain name on the local machine. Other Internet domain names can be obtained again.

Source: Internet
Author: User
Tags centos server
If you use file_get_contents to retrieve the domain name on the local machine on PHPcentos, false is returned. For example, the domain name www. jitapu. me is bound to a centos server. If you get www. jitapu. me content in php, false is returned. For example, {code ...} other Internet domain names can be obtained again .... in PHP centos, if file_get_contents is used to retrieve the domain name on the local machine, false is returned. For example, if a centos server is bound with a domain name www. jitapu. me. If you get www. jitapu. me content in php, false is returned.
For example

$str1 = file_get_contents('http://www.jitapu.me'); $str2 = file_get_contents('http://www.baidu.com'); 

Other Internet domain names can be obtained normally again. For example, $ str1 returns false and $ str2 returns normal content.
First, the firewall should be okay. Otherwise, how can we access other domain names? The firewall also has no restrictions on ports accessing 127.0.0.1. mysql can be used normally.
I have encountered this many times. Think twice about it.

Reply content:

In PHP centos, if file_get_contents is used to retrieve the domain name on the local machine, false is returned. For example, the domain name www. jitapu. me is bound to a centos server. If you get www. jitapu. me content in php, false is returned.
For example

$str1 = file_get_contents('http://www.jitapu.me'); $str2 = file_get_contents('http://www.baidu.com'); 

Other Internet domain names can be obtained normally again. For example, $ str1 returns false and $ str2 returns normal content.
First, the firewall should be okay. Otherwise, how can we access other domain names? The firewall also has no restrictions on ports accessing 127.0.0.1. mysql can be used normally.
I have encountered this many times. Think twice about it.

Ping www. jitapu. me On centos.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.