Check for URL existence with PHP

created on 2011-05-24 16:26:30

We can check the existence of URL in two ways using PHP. First one is the CURL and second one is using the get_headers function of PHP.

Basically we are checking HTTP header of the URL and based on that we can determine existence of the url. 200 Code stands for OK header and 404 stands for Not Found. You can check all the available HTTP Header Status Code.
Let’s get into both of the methods.

Read the full article here