March 19th, 2003, 07:13 PM
I've been given a task to write an function to validate URL's used on a website. The URL's are going to be kept in a table with other fields to indicate if the URL is valid and when it was last validated. Any URL's that aren't valid won't be displayed on the site.
Is there a way in ASP to check if any given URL returns a 404 error?
March 20th, 2003, 08:56 PM
yes there is a way, but I cant think of it right now....
would involve setting an if statement to say if pageLoads then insert live into db, if not then insert nothing or dead.... however, this if statement would have to be on every page. There is probably a better way.
March 20th, 2003, 09:01 PM
I found what I wanted here http://www.aspalliance.com/damianm/article/9/ but it uses ASP.NET.
I'm only new to ASP. Can it be done similarly in the current version of ASP.
I think using an if statemt whenever a link has been used is unavoidable. Using a function won't make this so difficult when presenting many links througout a site.
March 20th, 2003, 09:05 PM
No problem DrWorm, Im not even gonna attempt to answer the "can the ASP.net thing be done in classic ASP" as the short answer is I have no idea. I am about to move over to .net in a couple of months so will have a better idea then :-)