[nycphp-talk] Capturing screenshots

David Krings ramons at
Sat Nov 22 12:38:04 EST 2008

PaulCheung wrote:
> Hi,
> I would like to capture screenshots does anybody know if this is 
> possible using PHP? If that is possible would anybody know how to 
> transfer screenshots to a MySQL database?
> Cheer - Paul

Uhm, the PHP code runs on the server side. So unless you want to capture 
screen shots on the server PHP has nothing to offer. You'd need to look at 
ECMAScript applications that may do the trick on the client side. But then 
again, capturing a screen shot is fairly easy on most systems (the most 
difficult, but also most flexible IMHO being OS X) and uploading the resulting 
file isn't that tricky either.
There are two ways you can deal with image files and a database. You can crate 
a BLOB field and store the binary data in there, which bloats the db size, but 
keeps everything in one package. Or you can store the images on the file 
system and only store a reference in the database. While that is much leaner 
in regards to db size it comes with other problems, such as missing files and 
the difficulty in changing the storage location of the images.
In my (still not done after 3 years) PiViViewer application I use the second 
approach as I rather work with the disadvantages than be tied to the database 
and an application to retrieve the images.


More information about the talk mailing list