Determine whether a domain name exists? Welcome to collect experienced heroes to determine whether a domain name can be opened. I have used many methods, curl_init, fsockopen, file_get_content ($ url, NULL, $ text) where $ text is stream_context_create creation timeout, but it does not work for domain names that cannot be opened. here, it refers to opening blank pages (no HTML, no HEAD, no BODY) determine whether a domain name exists? Welcome to heroes with collection experience
To determine whether a domain name can be opened, I have used many methods, including curl_init, fsockopen, file_get_content ($ url, NULL, $ text), where $ text indicates stream_context_create creation timeout, however, it does not work for domain names that cannot be opened. here, it refers to opening blank pages (no HTML, no HEAD, no BODY), expired pages, and redirection effects. for details, refer
$ Arr = array ("http://www.baidu.com", "http://www.ccin.cc", "http://www.contourdes.com ");
In this data
$ Arr [0] The website is normal and there is no doubt there is no problem;
$ Arr [1] The website cannot be opened. if there is a problem, this is my problem. how can I judge and skip this issue? the curl_init, fsockopen, and file_get_content methods all set a timeout value during retrieval, if no timeout interrupt is set, try-catch can obtain the PHP has encountered an Access Violation at 7C95B56B.
$ Arr [2] The website expires. you can use get_headers or the method above to obtain the value.
------ Solution --------------------
Can I go directly to the domain name management website?
------ Solution --------------------
Get_headers
It cannot be reversed. None of the websites containing 200 of them can be accessed on the journey.
------ Solution --------------------
Right? Does curl return no error for the http://www.ccin.cc? So what did you get?
--------------------------------
Based on the plug-in extension function provided by the CSDN forum, I have made a signing tool and shared it with you. we welcome Technical Exchange :)
------ Solution --------------------
I have been doing this for a month.