| |||||||||||
| |||||||||||
Does a particular URL exist? Posted by admin (Graham Ellis), 24 July 2005 I'm often asked how to check whether a particular URL exists - we assure people there's a function in PHP to do almost anything and yet no single function exists for this purpose. The question cropped up again this morning and here's how I answeredQuote:
I've uploaded an example script - VERY carefully filtered and I'll be keeping my eyes on it too - to test URLs. It's here. If you visit the script, you'll find that it reveals its own source code (nice, but be careful) and that I've added in a test to make sure that it will only accept http:// type URLs. Posted by curtis (curtis), 8 October 2005 Nice job ![]() I never thought about checking URLs very much, but it looks like you've come up with a nice, simple method. On a somewhat related note, if you want to validate links, you can use the W3C's link checker. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |