Condition for link not found

[email protected] ("JM") Wed, 19 Jun 2002 14:28:15 -0400
Newsgroups php.lang
Message-ID <[email protected]>
I'm a beginner at PHP but couldn't find this in the documentation.

Can I construct a php condition that can check if a url exists?

Something like this:

if www.ibm.com is found
then href=www.ibm.com
else href=www.mysite.com/notfound.html