note 37835 deleted from function.system by cmb
| From: | cmb@php.net | Date: | Sun, 08 Dec 2019 11:48:01 +0000 |
| Subject: | note 37835 deleted from function.system by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213486@lists.php.net to get a copy of this message | ||
Note Submitter: diogaogv at icqmail dot com
----
a really useful use for import(); while running the server at ur own machine is taking a screenshot
of you desktop and showing it to the guest !!!
<?
echo system("/usr/X11R6/bin/import -window root -display localhost:0
/mnt/d/Desenvolvimento/Desenvolvimento\ WWW/import/cache/imagem.jpg -quality 30" ."
2>&1");
?>
<img src="cache/imagem.jpg">
remember to set chmod 777 to your directory (called "cache" on my code). also do
"xhost +" or you r gonna get a xlib error saying that it could not connect to x server at
localhost...
the code is still too simple. i've just done it. e.g. you can improve a real cache system
avoying more than one screenshot in a minute while...
that is it! hope u enjoy it ( rofl... =DDD ) ...
diogo86