Need someone to decompile a simple Flash form (approximately six input variables) on a website and create a PHP function that will do a "screen-scrape" and accomplish the same thing.
The Flash form is used to create and download a report and you should create a callable download_report() PHP function that will do the same thing and return the downloaded report as a text string.
You will need to figure out how to automatically login to the site (which uses https) and handle any session parameters. You can use curl functions to handle the interface. I will provide you with the login parameters to the test site and the URL to the report page.
The function you create should be compatible with both PHP4 and PHP5. Normally, the download_report() function will be called from a command line PHP program that is run as a cron job.
Since it is possible for a website connection to timeout, the download_report() function should be written with a "locking" capability to prevent it from being called more than once. If download_report() is called again before a previous attempt has completed, it should return with an error. You can use files in the /tmp directory to handle the locking.
The function interface should be similar to this:
download_report($host, $clientid, $username, $password, $form_vars, $timeout=60);
$host - URL of host (string)
$client - client ID (string)
$username - username (string)
$password - password (string)
$form_var - array of form variables
$timeout - default timeout of 60 seconds (int)
Décerné à :
I'm ready to start working on this. It's easy to capture data that Flash is sending to the server and then imitate the same with help of cURL. Session cookies also isn't a problem for me.