magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1996 > 10 > Programming with Perl  

Web Wandering for Broken Links

One of the problems in maintaining a good Web site is making sure there are good valid links to nifty places that may offer further relevant information, or perhaps just some nifty thing you've discovered. Discovering the links isn't very difficult, usually. After all, any of the big Web search engines or indexing services can probably give you more links on a given topic than you can visit in a lifetime.

The concern is that once you've copied that URL faithfully into your "hey, cool links here" page, things tend to move around, or even go away. Then you end up with a bad link. How do you discover this bad link? Well, you could spend a lot of time browsing your own pages, following all the links to verify that they're still good. Or, you could just sit back and wait for a visitor to email you, telling you that "this link is broken." (Be sure your email address is prominent on the page...I've visited too many pages with no apparent owners, and it's frustrating trying to report a bad link.)

However, you're reading this column, so I presume you'd like to hear about a simple tool I've written to follow these links automatically. With the easy-to-use LWP library (by Gisle Aas), you can write a program that fetches a page, looks for all its links, then tries each. In fact, this program, having noticed those links, can then also look at the content of those pages, looking for additional links, and so on. By recursively traversing the tree, you'll end up visiting everything possible.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2