[ruby & win xp] Captha problem

K

Kyle Robak

Hello, I have created small application which has to log me in onto
forum. Login form has also php generated token. Im using hpricot &
mechanize & captha to hadle this form. My problem is: when captha
download token to my hdd, i cannot open it and read letters from image.
I encouter info dialog that png image is broken and unreadable.

my code, to hadle token download:

captha_image = quest_get(CAPTHAURL + rand.to_s)

captha_file = File.open("captha.png", 'w')
captha_file.write captha_image.body
captha_file.close

thank You for interesting - any idea how to solve this one?
Kyle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,662
Latest member
sxarexu

Latest Threads

Top