On Mon, 2009-09-21 at 14:42 -0400, Al wrote:
What's the simplest way to test if a link is valid?
I've got a script that throughly checks the dns, etc. But, I'd also like to
check to see if the user has inputted a valid link to a webpage.
File_exists() and etc. seem to have a lot of
Several ways that I can think of:
* use the file_get_contents() which like you said, could be
overkill
* shell out to wget to retrieve just the headers for the path.
You'd be looking for a 200 return code, which indicates the URI
exists.
*
2 matches
Mail list logo