From: "Imobach González Sosa" Date: 2004-05-27T00:03:30+09:00 Subject: Re: Checking that an URL exists El Mi�rcoles, 26 de Mayo de 2004 15:09, Mohammad Khan escribi�: > Try this: > > ################################################### > > #!/usr/bin/ruby > > require 'net/http' > > h = Net::HTTP.new(ARGV[0] || 'www.nonexist-ruby-lang.org', 80) > url = ARGV[1] || '/' > > begin > resp, data = h.get(url, nil) { |a| } > puts "Valid URL" > rescue Net::ProtoRetriableError =>detail > puts "Retriable URL" > rescue > puts "Not a Valid URL" > end > > #################################################### > Thank you... just before getting the mail i had just write a piece of code that could do the work... but your proposal looks better ;-) Thank you. -- EuropeSwPatentFree (o_.' Imobach Gonz�lez Sosa imobachgs@softhome.net //\c{} imobachgs@step.es a2419@dis.ulpgc.es V__)_ imodev@softhome.net osoh en jabber.at y jabber.org Usuario Linux #201634 Gentoo Linux con n�cleo 2.6.6 sobre Intel Pentium 4