Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Can I detect a broken link in my CGI Perl script

by agent00013 (Pilgrim)
on Aug 08, 2001 at 20:35 UTC ( [id://103114]=note: print w/replies, xml ) Need Help??


in reply to Can I detect a broken link in my CGI Perl script

I'm not sure about the CGI part of it, but for the actual checking of the link you might want to look into LWP::UserAgent and for an example of LWP::UserAgent in action, try looking here. It's a long script, but maybe it'll give you some ideas.

You may just want to let the server handle 404 errors on your side. If it's their server with the bad link, just validate your links every so often with a cron job and have somebody look over the results every so often to take out links that are permanently down. Checking every link as you click it would waste system resources and slow down your site more than necessary.
  • Comment on Re: Can I detect a broken link in my CGI Perl script

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://103114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (1)
As of 2024-04-19 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found