PHP handles ping commands to get the IP of the batch domain name
PHP to handle also OK, other I will not, then use it, call the system command is to use exec, first look at the introduction:
ReferenceEXEC--Execute an external
The Baidu ping method uses the example to automatically ping Baidu. When using this method to access Baidu, I can use this method to generate a cache. when updating the cache, I can automatically ping Baidu. if the returned result is 0, the request
PHP Tutorial Configuration Chinese Narration
Let's see what you see, php.ini.
[PHP]
;;;;;;;;;;;; WARNING;;;;;;;;;;;;; This is the default settings file for new PHP installations.; By default, PHP installs itself with a configuration suitable for;
Baidu ping method example. This article mainly introduces the use example of Baidu ping method. you can automatically ping the website address to Baidu. for details, refer to how to use this method to automatically ping Baidu, my method this article
This example describes the ping port function of the PHP implementation. Share to everyone for your reference.
The specific implementation code is as follows:
Copy Code code as follows:
/*
* @author Xujiajay
* @date 2010-10-7
*
Intranet penetration, especially in a relatively large network environment, is likely to encounter a special network environment such as domain, intranet penetration in the domain environment will be another day.First, let's take a brief look at the
As the question. After Discuz was installed locally, the Discuz was moved to the server. Here the domain name bound to the server was opened, so it was strange that the domain name always specified a local address: localhostopenuploadportal. php?
Using file_get_contents on PHP CentOS to get the domain name on this computer will return FALSE for example, a CentOS server is bound with the domain name www.jitapu.me. Getting www.jitapu.me content in PHP will return false.
Like what
Other
Test procedure:
Exec ("ping baidu.com", $ list );For ($ I = 0; $ I Print $ list [$ I]. "\ n ";}?>
Chinese materials:This function is generally only used in linux
Few people put php on a windows server to run it. Some functions in php only support
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.