Php checks whether a url exists. php checks whether a url exists. Php checks whether a url exists. php checks whether a url exists. this example describes how php checks whether a url exists. Share it with you for your reference. The details are as follows: Copy the code such as php to check whether the url exists. php checks whether the url exists.
This example describes how to check whether a url exists in php. Share it with you for your reference. The details are as follows:
The code is as follows: function url_exists ($ url ){
$ Hdrs = @ get_headers ($ url );
Return is_array ($ hdrs )? Preg_match ('/^ HTTP \/\ d + \\. \ d + \ s + 2 \ d \ s +. * $/', $ hdrs [0]): false;
}
I hope this article will help you with php programming.
Examples in this article describes how php detects the existence of a url. Share it with you for your reference. The code is as follows...