CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
How To Check If Url iS Alive



Oct 1, 2000, 12:09 PM

Post #1 of 4 (359 views)
How To Check If Url iS Alive Can't Post

I can't use ping for this, and lwp seems to be too slow, How can I validate all my links in a data base. The url is in field three, How can I loop through the data and check if field3 is reachable and not a 404, 505, etc page.




Oct 1, 2000, 1:30 PM

Post #2 of 4 (359 views)
Re: How To Check If Url iS Alive [In reply to] Can't Post

You don't say why LWP seems "too slow", so I suspect your bottleneck is doing the verifications in serial fashion instead of in parallel.

Anyway, take a look at Randal Schwartz' Forking Parallel Link Checker, which I believe does what you're after.

Unfortunately, neither he or LinuxMagazine have posted the associated column/dissection (yet) so you'll have to do that part yourself or look at some of his older articles along similar lines such as Parallel bad links! from '98.

Of course, if you want to roll your own, take a look at the LWP::Parallel module instead.


Oct 1, 2000, 11:36 PM

Post #3 of 4 (359 views)
Re: How To Check If Url iS Alive [In reply to] Can't Post

Iy Ya Yia,

That's a lot of code. Smile

Thanks for all the input though. I'll try my best to use the code for my needs.

I was using lwp in a loop, so it was doing it url by url. I don't understand this LWP:Parallel though, Can you post a snipit of code, because that page leaves me lost as to how to use LWP:Parallel, Is it pretty easy?

Thanks Kanji Smile



Oct 1, 2000, 11:38 PM

Post #4 of 4 (359 views)
Re: How To Check If Url iS Alive [In reply to] Can't Post

Wait, I think I get it, Forget the snipit I'll be ok, Thanks Kanji Smile Smile



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives