[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ruby & win xp] Captha problem

Kyle Robak

7/31/2008 2:00:00 AM

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
--
Posted via http://www.ruby-....