![]() |
![]() |
|
Current Projects: PHP on XP Guide — NFO Viewer — Easy Reflections — Photon Storm — HotWire — FileGlider
Wednesday, July 11. 2007Two interesting new PHP commandsTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
One possible use case would be to interact with your desktop via an iphone web application. I have done this on myacbook for controlling slide presentations. While its a bit slow it makes for a cool toy to impress people with.
On the black screen: perhaps the screen saver was active...
#2
on
2007-07-11 07:07
I thought that too, but it wasn't the case. I disabled the screen saver prior to testing, although I didn't expect it to have any difference given the way most software grabs the screen.
"I'm not so sure about the use of grabbing the entire server desktop"
That's what imagegrabscreen does.
"but I'm sure someone will come up with something. If you've managed to get either of these two functions to work then please comment about it."
My announce post contains some example (which are in the docs:
http://blog.thepimp.net/index.php/post/2007/04/17/Screen-capture-with-PHP-and-GD
"perhaps the command just doesn't work properly yet"
It works well, it has been successfully tested on XP (SP2), 2k3 and vista and it even works better than many other system (grab full window even when part of it is offscreen).
If you have some scripts to reproduce your problem, I may try to help.
"That's what imagegrabscreen does."
My comment was that I couldn't think of a USE for it, not that I couldn't think how to get it working :) which is why I asked if anyone else had any ideas (which as you can see a few did).
"If you have some scripts to reproduce your problem, I may try to help."
I used the scripts in the PHP online help files. When those don't work I rarely bother trying anything else if it says "Possibly only in CVS" at the top. That makes me assume the commands just don't work unless you're running a CVS release yet.
However if what you're saying is that they should work even in 5.2.3 then that's a different ballgame altogether - and I'll definitely read over your link and check out your code to see if I can get them running here, because both commands I find really exciting (which is why I blogged about them in the first place).
I am curious though - if the commands work well, why does the online documentation not say this? Why are they listed as experimental / possibly only CVS?
The blank screen is due to apache or what ever php is running in not having permission to interact with the desktop. To solve this goto the computers services find apache goto properties, select logon and check the box that allows the service to interact with the desktop.
I tried the functions after reading this article. As I have no windows server running I decided to install the latest WAMP-server (which included PHP 5.2.3) on my windows XP notebook. This however didn't seem to be working too well. I got the timeout when trying 'imagegrabwindow' as well, and imagegrabscreen simply stated 'function imagegrabscreen does not exist'. I guess I should try this with the latest CVS snapshot but besides that it seems obvious that these functions are still in development and don't seem to be very stable at the moment.
Besides that I thought about why these functions could be useful when developing applications, but I'm afraid I can't really see the point in taking screenshots. The only useful feature I can think of is 'automatically making screenshots of URL's' but besides that, for me the functions seem to be pretty cool but pretty useless at the same time. Could you point out why you think these functions are that useful? What would you use them for in applications?
I got it working!!! =) If you get black images or error messages checkout the little article I wrote, which is a little how-to on how to get these functions running using WAMPserver:
http://www.ibuildings.nl/blog/archives/68-How-to-use-imagegrabscreen-and-imagegrabwindow-with-WAMP5.html
I have this running in a win 2k3 server with Apache.
However, even though GD, php, and Apache are running and testing well, when I run my script I still get only a black screen. I have selected to have Apache interact with Desktop but still am getting a black screen.
Does anyone have any clues for me?
There seems to be in issue when you try executing these function on a remote server.
To be more specific, if you are running Remote Desktop and run these functions, they work as expected. when you disconnect and run the same code again, you get a black capture.
My thinking is when no one is logged on the server, there is no active desktop session for the video to screen cap from...im trying to figure this one out
#8.1
on
2008-08-22 22:46
i too got it working , there waz a problem with apahe and php and wamp here , so i opened it in the internel server of dev-php and yay , it captured the screen
#9
on
2008-02-11 18:57
I was just surfing looking for information as to how to create a screen shot and i stumbled on this blog, and it was very informative. Thanx for the new tips!
The author does not allow comments to this entry
|
My AS3 Blog
Photon Storm Great PHP links
C7Y PHP Podcast CorePHP is hosted by |