Archive for May 31st, 2006

Determining if a URL exists with Curl

Its quite common for people to enter in their URL when signing up - but what if you want to verify that this is a real page? You can validate the URL using a regular expression up to a point, but all that tells us is that the URL is well formed. What I wanted to do was to check that the page exists - i.e. that we don't get a 404 for it.

Luckily, this is quite easy if you have the Curl extension installed.

Continue Reading 6 comments May 31st, 2006


Calendar

May 2006
M T W T F S S
« Apr   Jun »
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by Month

Posts by Category