File.open(“my.mp3”,“wb”) do |file|
file << open(“http://…”)
however, this only works for files that are located directly at that
location i.e. http://random…/random.mp3, not for php hosted files like
the examle I had given. Please help!
It looks like you need to log in to the site before you can download
that file, correct? If that is the case, I suggest using
WWW::Mechanize. It lets you fill out forms, and manages cookies and
redirects for you.