Posted by Toby A Inkster on 02/21/07 12:13
Gordon Burditt wrote:
> PHP runs on the server. Any use of system() will also run on the server.
> Taking a snapshot of the screen of the server is (a) likely not what
> was wanted,
Well, that's precisely the method used by services like BrowserCam.
Linux/UNIX servers using X11 can have multiple displays. A dedicated
display (e.g. ":1") could be set up as 1024x768 running Opera in full
screen mode.
Then the PHP script calls the following command with system():
opera -remote 'openURL(http://www.example.net/)'
waits a designated amount of time (10 seconds?) and then calls:
import -display :1 -window root /tmp/screen-shot.jpeg
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|