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.

Reply via email to