skip to the main content area of this page

require 'net/http'

require 'uri'

def GetCurs( year, month, day, moneda )

uri = URI.parse( 'http://www.infovalutar.ro' + '/' + year.to_s() + '/' + month.to_s() + '/' + day.to_s() + '/' + moneda + '.bnr' )

http = Net::HTTP.new(uri.host, uri.port)

request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)

return response.body

end

eur = GetCurs( 2005, 10, 12, 'EUR' );

 puts eur

Credits : www.fileleader.com

Resurse pentru preluat cursurile BNR/BCE
de catre programatori / site-uri / oameni
obsolete
  • cursuri.rss
  • rss.aspx