Link checker

by Marty Landman <marty(at)face2interface.com>

 Date:  Fri, 01 Dec 2000 16:23:24 -0500
 To:  hwg-languages(at)mail.hwg.org
 Cc:  kathywargo(at)hotmail.com, Lyle(at)lcrcomputer.com
  todo: View Thread, Original
Kathy Wargo wrote

--------------------------------------------------------------------------------------
I need a routine to verify if the addresses are still viable (not broken).
I would like to run a script or I will write code to check to see if each
web address still links.

Can anyone suggest a product or a routine?
---------------------------------------------------------------------------------------

This is very easy to do in Perl providing that's an option.

Here's all the code you need for the essentials :

use LWP::Simple;
head 'http://thecgibin.com/' or print "Dead Link\n";

Here's the link to the LWP Cookbook if you'd like more detail.

http://lab.dce.harvard.edu/extension/cscie13/library/LWP/lwpcook.html

<hint>A programmer could set up an interface to their own site, downloading 
your links on some pre-scheduled basis and then uploading a report of the 
outcome. </hint>

I'd be understating if not being quick to point out that the devil's in the 
details here. For instance, how are you going to organize the list of 
links? Is it being done on the fly, or many in one batch? Also, as you 
surely realize from normal web surfing on a browser it's possible to get 
false negatives, e.g. yesterday at one point I couldn't get through to 
Yahoo... of course the link wasn't actually dead.

Hope this isn't much more info than you wanted. The basics are real easy 
and it'll get as complicated as your requirements demand from there.

HTH,

Marty Landman
http://face2interface.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA