From: Michael Morin Date: 2009-06-29T23:27:42+09:00 Subject: Re: Get file from web page that require user and pass On Mon, Jun 29, 2009 at 10:16 AM, Kga Agk wrote: > I want to connect to a web site that require user name and password. > This adress holds a file, like a txt, image pdf and so on. I want to get > this payload. (Only going to check if the file is is empty or not). > > > I Have tryed a billion different ways, but i cant get it to work. I get > errors and stuff. The last error is like this. > > /usr/lib/ruby/1.8/net/http.rb:560:in `initialize': getaddrinfo: Name or > service not known (SocketError) >  from /usr/lib/ruby/1.8/net/http.rb:560:in `open' >  from /usr/lib/ruby/1.8/net/http.rb:560:in `connect' >  from /usr/lib/ruby/1.8/timeout.rb:53:in `timeout' >  from /usr/lib/ruby/1.8/timeout.rb:93:in `timeout' >  from /usr/lib/ruby/1.8/net/http.rb:560:in `connect' >  from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start' >  from /usr/lib/ruby/1.8/net/http.rb:542:in `start' >  from /usr/lib/ruby/1.8/net/http.rb:1035:in `request' >  from waste/waste.rb:20:in `get_feed' > > And here i even tryed a code som other guy made, it is on this site: > http://blog.patrick-morgan.net/2007/02/ruby-https-with-http-basic-auth.html > > > So how do i get the file that are stored on a web page that require > username and password? > -- > Posted via http://www.ruby-forum.com/. I address authentication in my Twitter articles. Here's one that show you how to use basic_auth. http://ruby.about.com/od/networking/qt/tweetruby.htm Without seeing your code, it's hard to say where exactly you went wrong.