Re: [DEV] Attaching binary executable to extension
| From: | Ángel González | Date: | Mon, 14 Jan 2013 17:40:09 +0000 |
| Subject: | Re: [DEV] Attaching binary executable to extension | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-10214@lists.php.net to get a copy of this message | ||
On 14/01/13 14:41, Yahav Gindi Bar wrote:
> On 14 בינו 2013, at 15:24, Ángel González wrote:
>> If it's just a wrapper for the program, you don't need to include the
>> program. It should just be noted that "it needs X program installed".
>> However, I wonder why you need a php extension in such case. It seems as
>> it could be done in php.
> Because as discussed in many threads I saw in the net, there's no cross-platform way to
> take a website screenshot.
> gd contains imagegrabscreen() however it's been support only on Windows based platforms.
> for linux solutions, usually one uses a web service or execute program using exec and such.
> The main problem I see here is that users without root access in shared environments can't
> take screenshots without usage of external web service, so I thought it'd be nice to wrap a C
> program that uses Qt WebKit wrapper in some PHP methods in order to take screenshots.
>
> Do you know a cross-platform way that I've missed? Is this justification OK for PECL
> extension?
I am not discussing your need for a binary. My point is that if all that
your extension does is calling an external program, you are better
launching it from php. Specially if you are targeting shared environments.