Archived

This topic is now archived and is closed to further replies.

DarkEldar77

404 ERRORS

Recommended Posts

Hi, I am writting a MFC Dialog Based Application. I have a list of web sites and I was wondering is there a way to find out if they are 404 before even opening them? Thanks For Your Help

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
404 is a response from a web server. You can''t get the response without first making the request.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
When you say request do you mean something like this?
WinExec("explorer.exe http://www.gamedev.net, SW_NORMAL);

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
No, an HTTP request to the web server, like "GET /default.aspx".

If you''re looking for a programatic way to request pages, look at InternetOpenUrl() in the WinInet sdk, or System.Web.HttpRequest in the .NET framework.

If you use Un*x, you''re on your own, but you can simply open a TCP socket to the web server and directly talk HTTP to the server.

Share this post


Link to post
Share on other sites
you can just request the headder of the page ( using HEAD instaed of GET ) any http server worth is''s salt will return either 200 OK or 404 Not found in the headder. ( along with mime type & cache info )



/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''''t use it...

Share this post


Link to post
Share on other sites