Well I used the Query method as it seems simple enough a solution. But concerning your comments how would you ascertain that information WITHOUT using the Query method..
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of TJ Houston > Sent: 15 March 2005 14:20 > To: [email protected] > Subject: Re: [msvc] How do I validate a URL link? > > > You can, even without the function that Rupert supplied, so > long as the webserver is standards-compliant. > > If you access a page, the response should be an HTTP response > code followed by other appropriate information, such as the > following (in the case of a bad request to google.com's server): > > HTTP/1.1 400 Bad Request > Date: Tue, 15 Mar 2005 14:12:01 GMT > Content-Type: text/html > Server: GFE/1.3 > Content-Length: 1237 > > In the case of a "page not found" you'd get something like > this for the first line: > > HTTP/1.1 404 Not Found > : > etc > : > > There is almost always a hypertext page follows these codes > (which is the page content you see with the browser), though > in some cases, these are created by the actual browser itself > (hard-coded response pages, like the "Bad DNS blahblah. Check > network blahblah" you get with IE, etc), when there really > -is- no data to be found (no response from server... > incorrect server port... no DNS info... etcetc). > > But yeah... QueryInfoStatusCode() works too! ;) I believe it > checks just that info... > > Regards, > -Teej > > > > > HTTP 404 > > > > > > > > And that seems to be common for ALL invalid or unavailable > > > > links... > > > > > > Nope. Try typing in / clicking > > > > > > http://www.google.co.uk/testy.htm > > > > > > The page that is returned is not the standard 404 page, it's the > > > server's own response. Same for this: > > > > > > http://www.ntlworld.com/testy.htm > > > > > > (or .co.uk, for the pedantic {:v) ) > > > _______________________________________________ > msvc mailing list > [email protected] > See > http://beginthread.com/mailman/listinfo/msvc_beginthread.com > for subscription changes, and list archive. > > > This message has been scanned for viruses by MailControl - > (see http://bluepages.wsatkins.co.uk/?4318150) > This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
