Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
March 7, 2007, 7:18 am
rate this thread
What do you mean by valid?
is a valid URL, in that it conforms with all the syntactic rules that URLs
are required to conform to; but there's no web page there; indeed the
entire domain name does not exist, and in unlikely to exist at any time in
the foreseeable future, as it's in a currently non-existant top level
If you merely want to check that a link conforms to the syntax rules for
URLs (like the one above) then you can use regular expressions. Google for
you should be able to learn what you need.
If you actually want to check that a page exists at the given URL, and
isn't, say, a 404 page, then you'll need to look into AJAX. Because of the
other domains, so you'll need to write a server side script that takes a
URL, performs an HTTP HEAD request on that URL and checks for a "200 OK"
server-side script via AJAX. There may be a significant delay in checking
the URL if either your server or the server hosting the supplied URL is too
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Ah yes, the good old difference between "Validation" and "Verification"...
Something I learnt about 20 years ago (:-S)... I threw that question ("what
is the difference between data validation and data verification?") at one of
my previous developers - he was a recent IT graduate... He had to think for
quite some time before he answered (correctly)... saying that, as it was 20
years since I learnt it, so did I ;-)
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"