Page 1 of 1

screenshot through PHP?

Posted: Mon Mar 03, 2003 12:38 am
by sploit
I need to be able to make the visitors of my site play with a few drag-and-drop images, take a screen shot and then mail it to us.

A javascript drag-n-drop script can be seen at:
http://javascript.internet.com/page-det ... -drop.html

1. The user can press PRINT SCREEN on his keyboard. Through my PHP script, I want to be able to copy that image from the clipboard into a file and email it to myself.
2. Or the user may just click a button/link on my PHP page, which will do all this (screenshot and email) by itself.

Please let me know if this is possible, and if yes... how?
Thanks.

Posted: Mon Mar 03, 2003 1:12 am
by McGruff
Php is a server side language so it can't see what's in a client PC clipboard. Don't know much about javascript: could js access the clipboard?

You could output the script used to build the page to an html file, then attach that to an email.

If you use absolute links to images in your code (ie http://yoursite.com/etc), the end user could open the html file and view them OK - but only if he's online.

Or you could maybe build a pdf file where (presumably) you can embed images in the document. Haven't looked at the php pdf stuff yet though so not sure.

Don't know if that's much help - might give you some ideas.

Posted: Mon Mar 03, 2003 5:21 am
by volka
afaik js cannot access the clipboard (and I like it that way)
But you might get the locations of the items of the html-page via js and send those.

Posted: Tue Mar 04, 2003 10:54 pm
by sploit
hmm... thanks for the input guys.
so you mean i could use javascript to get the position of the images the user has played around with and then reconstruct another html page and use that...?
thanks.