# Fill out external form?

**URL:** <https://www.ruby-forum.com/t/fill-out-external-form/103713>\
**Category:** Rails\
**Created:** [May 9, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/fill-out-external-form/103713 "2007-05-09T16:41:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matrixon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@matrixon](https://www.ruby-forum.com/u/matrixon)\
**Post date:** [May 9, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/fill-out-external-form/103713/1 "2007-05-09T16:41:46Z")

</div>

Hi i was wondering is there a way to use ruby on rails to fill out  
fields in an external webpage submit it and get the result. Like ruby  
auto loggin in to a mail account and retrieving a mail or something like  
that?

---

<div class="post-metadata">

**Author:** ![matrixon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@matrixon](https://www.ruby-forum.com/u/matrixon)\
**Post date:** [May 9, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/fill-out-external-form/103713/2 "2007-05-09T16:46:46Z")

</div>

Hi,

Now if I understand you correctly what you’ve described here is a  
simple HTTP transaction which can be performed by pretty much every  
modern programming tool out there. What do you need Rails for here?

Cheers,  
Yury

On 5/9/07, Hector M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

–  
Best regards,  
Yuri L.

---

<div class="post-metadata">

**Author:** ![matrixon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@matrixon](https://www.ruby-forum.com/u/matrixon)\
**Post date:** [May 9, 2007, 5:28pm UTC](https://www.ruby-forum.com/t/fill-out-external-form/103713/3 "2007-05-09T17:28:05Z")

</div>

i live in mexico and theres a page for sending free sms to cellphones  
but its full of publicity , it has 3 fields with name , phone number and  
message. i want to make an app on ruby on rails so that it fills this  
fields and click submit withouth me having to actually enter this page.  
i dont know if im making my self clear i hope i am thnx for the help.

---

<div class="post-metadata">

**Author:** ![matrixon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@matrixon](https://www.ruby-forum.com/u/matrixon)\
**Post date:** [May 9, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/fill-out-external-form/103713/4 "2007-05-09T20:57:37Z")

</div>

Yuri’s point was that Rails is a framework for building database-backed  
web applications. You probably just need a command-line script… er,  
unless maybe you wanted to make your own web page that called the other  
web page but didn’t have the ads… yeah, I can see that.

Anyway, what you need is a web scraping tool. Popular tools I’ve heard  
of (but have not used) are scrubyt ([http://scrubyt.org](http://scrubyt.org)) and hpricot  
([http://code.whytheluckystiff.net/hpricot/](http://code.whytheluckystiff.net/hpricot/))

You might also do some googling for a Ruby SMS library (uh, like  
ruby-sms: [http://raa.ruby-lang.org/project/ruby-sms/](http://raa.ruby-lang.org/project/ruby-sms/)) and just do the  
SMS work yourself… then you don’t have the overhead of scraping the  
SMS website and you’re not dependent on them being up.

b
