|
Gilles Muller - 2017-03-28 11:13:01
Hello,
I'm french, sorry for my bad english ...
Your script is very good ! I have to make screenshot of a plan (canvas), 3D Dev.
html2canvas.js works well for div but not for canvas (it's make a black screen).
With your script, i hope i can do a screenshot of the webpage as the keyboard touch Print Screen and then save as jpg/png on the server.
I want a screenshot of a webpage accessible only with login and password.
My config :
$screenShot = new screenShot('http://extensio-cardea.fr/index.php', 'jpg');
Can I make a screenshot when i'm logged ?
Thanks you very much
Dave Smith - 2017-03-28 23:41:32 - In reply to message 1 from Gilles Muller
There are no authentication methods built into the package, so you will just need to set up your own to password protect the page that displays the screenshot. How you accomplish this through .htaccess or scripting is up to you.
Regarding the blank image, try setting a delay to allow the javascript and css to process...
$screenShot->setParam('delay',5);
This sets a 5 second delay, although you can adjust up this to 20 seconds if you need more time. Not sure this will resolve the issue, however it is worth trying.
Dave
Gilles Muller - 2017-03-29 08:57:17 - In reply to message 2 from Dave Smith
Thanks for your answer.
If i'm logged, can I use directly the script maybe with relative adress and not absolute adress :
$screenShot = new screenShot('http://extensio-cardea.fr/index.php', 'jpg');
-->
$screenShot = new screenShot('index.php', 'jpg');
More simply, when i see of my screen what i want to capture (so i'm logged), i want to use your script (maybe it's easier to understand).
Have you a solution ?
Dave Smith - 2017-03-29 09:47:58 - In reply to message 3 from Gilles Muller
Since it is an api call to a web service, the web service needs to be able to access the page through the web so you need to supply a full url.
What you can do is generate a nonce that can be stored and sent with the url. When the service reads the page, the nonce allows it in that one time and then becomes invalid.
You should be aware though, the service will cache a page so that subsequent requests for the same page are not charged against your api usage. Using a nonce will generate a new, unique, request each time and the cache will never be used.
Dave
|