Ok, so I have searched for this one quite a bit... and tried the methods on here and what I found on php.net.
This includes trying file(), get_headers() and a couple others.
What is the best way to do this? I can't find a solutio that is reliable. Particularly get_headers() I found on some occasions reports HTTP/1.1 200 OK on files that are not there - when you follow the link you get the 404 error page.
Any ideas? I'm using a XML feed from an external resource and it includes links to images and pdf's on there website - however, some of the links are dead.