So iMacros has this shit on lockdown with a little help from php. First you'll need a table
CREATE TABLE IF NOT EXISTS `screenshots` ( `id` int(11) NOT NULL AUTO_INCREMENT, `screenshot_timestamp` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=751 ;
In simple terms, that's a table with a unique id & a timestamp. We're storing the location of our screenshots here. Since databases are for text, we'll need a folder to store the actaul screenshots so make a folder called /screenshots/ in your www directory and give it 777 permissions (web security is beyond the scope of this tutorial, CYOA).
Lets switch gears to iMacros so you can get a clearer picture of how we're pulling this off.. You'll insert the below anywhere inside your iMacro that you want to send a screenshot to the mothership.
Lets switch gears to iMacros so you can get a clearer picture of how we're pulling this off.. You'll insert the below anywhere inside your iMacro that you want to send a screenshot to the mothership.
SAVEAS FOLDER=C:\Screenshots
FILE=screenshot
SET !TIMEOUT 1500
TAB OPEN
URL GOTO=http://{{data_url}}/ss_uploader_for_wf.php
WAIT SECONDS=1 TAG POS=1 :FILE FORM=NAME:form1 ATTR=NAME:file CONTENT=C:\Screenshots\screenshot.png
WAIT SECONDS=1
TAG POS=1 :SUBMIT FORM=NAME:form1 ATTR=ID:mybut
SET !TIMEOUT 180
WAIT SECONDS=1
TAB CLOSE
Line 1 takes a FULL PAGE screenshot of the current page you're on in firefox. it stores it into a folder C:\Screenshots\ (create this folder on every satellite). Line 2 sets a really big timeout ... pictures take a second to upload. Line 3 opens a new tab so we can save our current page for more processing. Line 4 opens a page on our mothership (more on that in a sec). Line 6 is us simulating the clicking of a browse button on a form that lets us upload a picture. Line 8 submits the form. After that shit is done, close the tab and we're back where we started.
Honestly, this is for a lot more than eyecandy ... it's incredibly important for troubleshooting. When we're dealing with remote computers as workers, this is actually how we're going to find out there bugs in our system. I take screenshots and upload them during any important steps (login, proxy verification, data submissions, confirmation pages, ....).
So as for the /ss_uploader_for_wf.php page, it's too much to paste here so i'll dropbox it.
https://dl.dropboxusercontent.com/u/28853611/ss_uploader_for_wf.php
I can't take credit for that (nor would I want to), it's just a chopped up something I found on the web. The important lines are 48 (screenshot folder on mothership) and 56 (DB insert) If you'll check out the functions at the bottom of the page you'll get a sneak peak of something we'll talk about later.
From there, we've got imacros sending screenshots to our mothership and she's tucking them away in a folder and inserting into a database table so we can give ourselves the option to loop and display for viewing at our leisure. The specifics of how to do that I'll leave up to your imagination. There are many jquery widgets that you can use for outputting to any web page.
Honestly, this is for a lot more than eyecandy ... it's incredibly important for troubleshooting. When we're dealing with remote computers as workers, this is actually how we're going to find out there bugs in our system. I take screenshots and upload them during any important steps (login, proxy verification, data submissions, confirmation pages, ....).
So as for the /ss_uploader_for_wf.php page, it's too much to paste here so i'll dropbox it.
https://dl.dropboxusercontent.com/u/28853611/ss_uploader_for_wf.php
I can't take credit for that (nor would I want to), it's just a chopped up something I found on the web. The important lines are 48 (screenshot folder on mothership) and 56 (DB insert) If you'll check out the functions at the bottom of the page you'll get a sneak peak of something we'll talk about later.
From there, we've got imacros sending screenshots to our mothership and she's tucking them away in a folder and inserting into a database table so we can give ourselves the option to loop and display for viewing at our leisure. The specifics of how to do that I'll leave up to your imagination. There are many jquery widgets that you can use for outputting to any web page.