Page 1 of 1
Screenshot via php
Posted: Mon Aug 15, 2005 10:23 am
by Todd_Z
I know there have been threads about this in the past- but they kinda died out before being solved.
I have a virtual server hosted by ipower and I want to be able to enter in a url and have load a screenshot - via a php script. Is this possible... do i need to load firefox onto the machine, i don't even know if there is a monitor attached to it . Basically - i have no idea where to start.
~ Thanks in advance
Posted: Mon Aug 15, 2005 10:28 am
by feyd
you don't need a monitor, per se, as much as you need a graphics driver that can render the UI to the graphics card, or file, or whatever.
If done right, you could probably create an extension in php that uses the Gecko rendering engine to fake a screen capture.
Posted: Mon Aug 15, 2005 10:32 am
by Todd_Z

This is kinda a small feature to my site. I would love to have the capability, but i feel like its not worth it to start from scratch with that. Has anyone seen a script similiar to this with open source?
Posted: Mon Aug 15, 2005 10:49 am
by JayBird
this is the only thing i ever found
http://www.thumbshots.org/
Posted: Mon Aug 15, 2005 11:23 am
by timvw
I've once read "WINDOWS SCRIPT HOST GRAND CRU" which had some package that allowed you to create a screenshot. So it hacked a quick script like
http://timvw.madoka.be/programming/vbs/ ... ot.vbs.txt together.
Two issues:
1-) I can't find the tobtools.zip anymore.
2-) It doesn't scale to a large site (It depends on the fact that IE will have focus etc..)
In a *nix environment you don't need a monitor to make a screenshot. A working X server will do. For example, if you have firefox and imagemagick installed:
Code: Select all
firefox http://example.com -display localhost:0 &
import -window root -display localhost:0 myfile01.pcx /home/user/website/screenshot.png
chmod o+r /home/user/website/screenshot.png
Posted: Mon Aug 15, 2005 11:42 am
by Roja
timvw wrote:
In a *nix environment you don't need a monitor to make a screenshot.
Awesome! I never found the commands to pull that off. Much appreciated!