All-way php interview questions

Source: Internet
Author: User
For a php interview question, write a server status check code to check whether index.html?regular on the full-department website of http://www.wps.cn/is this question true? How can we solve this problem and ask the experts to solve it ;? Php $ hosts = gethostbyname: a php interview question
Write a piece of server status check code to check if index.html access on all regions of the http://www.wps.cn/domain name is normal
Is this question fsockopen? How can this problem be solved?

------ Solution --------------------
This cannot be done.

Discussion

$ Hosts = gethostbynamel ('www .wps.cn ');
Foreach ($ hosts as $ host)
{
$ Content = file_get_contents ("http: // $ host/index.html ");
If (strlen ($ content) = 0) echo 'Access denied ';
}
?>
......

------ Solution --------------------
Is this what php can do?
This is the network management thing: server load balancer
You cannot take the questions of network management to test php because you are a php programmer and a network administrator.

Although php provides socket functions, this is not accomplished with socket.
Because php does not provide a means to read the list in charge of balanced pointing.


------ Solution --------------------
Intuitively, isn't it? is this question clearly written in php?

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.