I wrote the following to see if a submitted URL has a valid http response code and also if it responds quickly. Use the code like this: <?php $is_ok = http_response($url); // returns true only if http response code < 400 ?> The second argument is optional, and it allows you to check for a specific response code <?php http_response($url,'400'); // returns true if http status is 400 ?> The third all
![PHP: cURL - Manual](https://cdn-ak-scissors.b.st-hatena.com/image/square/4dd02c2555ca1b32548779e23dc3e33a9f46bf13/height=288;version=1;width=512/https%3A%2F%2Fwww.php.net%2Fimages%2Fmeta-image.png)