how do you access a remote XML file?

Hi, I'm trying to get a captch thing running from http://textcaptcha.com/ which displays an XML file when you trail a key on that URL. I've tried this: @captcha = Net::HTTP.get_print URI.parse('http:// textcaptcha.com/api/8wcmmrp2tzoc0k484kkwwkwcsdbpk70q') in the controller of the file that I want to have access to the data, but nothing is displayed in the @captcha variable. If I direct my web browser to that URL, however, I see the correct output.

I'm requiring 'net/http' and 'uri' in the controller. Am I missing something?

Thanks in advance.

Hi, I'm trying to get a captch thing running fromhttp://textcaptcha.com/ which displays an XML file when you trail a key on that URL. I've tried this: @captcha = Net::HTTP.get_print URI.parse('http:// textcaptcha.com/api/8wcmmrp2tzoc0k484kkwwkwcsdbpk70q') in the controller of the file that I want to have access to the data, but nothing is displayed in the @captcha variable. If I direct my web browser to that URL, however, I see the correct output.

I'm requiring 'net/http' and 'uri' in the controller. Am I missing something?

All get_print is supposed to do is output the data to the console. get_response will instead return a Net::HTTPResponse object which you can play around with.

Fred

Thank you sir!