zikko has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, i'm new here. I have a question for you, i have a flash site with a button, now i need to know how to interact using perl, i have to click the button and catch the response from the server, how can i do? Thank you in advance.

Replies are listed 'Best First'.
Re: Flash & Perl
by Corion (Patriarch) on Dec 26, 2009 at 17:33 UTC

    The easiest approach is to look at what data the Flash client is sending (using Live HTTP Headers for Firefox or using Wireshark), and then to send that same data using Perl. Alternatively, you can use UI automation tools like Win32::GuiTest, but it's inconvenient to automate Flash sites using such tools, because you can't conveniently read the components within the Flash VM.

      First of all, thanks for your answer =) Now I think I understand how i can do but I'm not so sure, I manage well Mechanize & LWP, but from what you told me I should recreate the headers of the request ... I do not know where to start, can tell me how to do or at least redirect to some source? thanks. Ps. sorry for my bad English :P

        Your English is very good. The easiest way to start (I think) is to look at WWW::Mechanize, because WWW::Mechanize will already send "good" headers like a browser would. If that's not enough and you need to add other headers, WWW::Mechanize has methods for that as well, and in the emergency case, you can create your own HTTP::Headers for your HTTP::Request object that you then send through LWP or Mechanize.

        I suggest you compare the headers your Perl script sends against what the Flash sends and add/change headers until the thing works.