Url exists function to check remote url


/ Published in: PHP
Save to your folder(s)

If you have to test if a remote url is correct you can use CURL and get the headers returned by the http request. If you receive a 200 code, than it’s ok, else the url is not correct:

URL: http://www.barattalo.it/2010/01/06/test-if-a-remote-url-exists-with-php-and-curl/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.