1

I am building a plain vanilla Rails 3 app, where I would like to make a google query on server side, using some data user provided through a form, access say top 1-2 results from the results of that query and extract some data from them (all still on server side) and then serve the data back to the user on client side.

Is that possible? if yes could you give me at least a few broad ideas of solution so i know which direction to investigate?

many thanks

DIF
  • 2,470
  • 6
  • 35
  • 49
Arby Wabd
  • 11
  • 2
  • 1
    You can check this http://stackoverflow.com/questions/4581075/how-make-a-http-get-request-using-ruby-on-rails – kalifs Mar 05 '12 at 08:24
  • I guess i can use google custom search API (e.g. http://stackoverflow.com/questions/6434763/google-custom-search-api-with-pagination) to do the initial search. Maybe the way the other poster is doing web access also works for the results. Will post back here whether it works... – Arby Wabd Mar 05 '12 at 10:57
  • confirmed. OpenURI solves my problem. Really easy once solution is known, as expected. thx – Arby Wabd Mar 05 '12 at 11:56
  • many thanks Kalifs. i've solved my issue with open-uri but the article you linked opens some other solutions i am going to explore... – Arby Wabd Mar 06 '12 at 18:42

0 Answers0