Screenshot via PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

me thinks it's user permissions... make sure the exe has "interactive with desktop" rights.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

And the command prompt version shows 'test' as a valid window title to grab?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

yes - the exact same command in the cmd prompt works
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Hmm, not sure then. In *nix it would be easy to debug as you could assume the web user id and run it, but in windows i'm not sure.
The method does work as i'm using it for around 500 screenshots per day (don't ask why i'm using PHP for this and not some Delphi, C# app .. i just am ;)).
If i remember correctly, when i first did this the only decent debug method i had was trial and error (in the PHP code) until i hit upon the exact method that worked, which was the command i originally posted (in my case) .. i can't think of anything more constructive than hit and hope right now :o
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

I just noticed you said,
No matching window found for "test"\r
Was the \r actually in the error?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Yea - im just posting what it says in the error_log
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Hmm, ok, i just wouldn't have expected a raw \r to appear in there unless it was also in the PHP code, but i never use the error log so .. *shrug* :o
Post Reply