Page 1 of 1

Using PHP with windows API's. Possible?

Posted: Tue Feb 15, 2011 1:06 pm
by Aristona
Hello,

I am a PHP developer but I want to use PHP for something else. I want PHP to handle something and post result to a form by using windows API's like ShowMessage() SendMessage().
For example; PHP queries database with (SELECT TOP 1 Username FROM USERS) and appoints the result into $username variable. Then $username variable should be posted into a textbox of a form application. (e.g A textbox of Blahblah.exe which is running.)

Is it possible to do it with PHP?

Ps. I know it's possible with languages such as C++, VB but I want to know if it is possible with PHP. (somehow)

Re: Using PHP with windows API's. Possible?

Posted: Tue Feb 15, 2011 1:12 pm
by AbraCadaver
I haven't used COM in a while and not that extensively, and I have never used this: http://us3.php.net/manual/en/function.c ... object.php

But it sounds like what you want.

Re: Using PHP with windows API's. Possible?

Posted: Tue Feb 15, 2011 5:22 pm
by Weirdan
AbraCadaver wrote:I haven't used COM in a while and not that extensively, and I have never used this: http://us3.php.net/manual/en/function.c ... object.php

But it sounds like what you want.
Nope, that's for COM servers - meaning applications specifically exposing API through COM. Aristona wanted to use lower level winapi calls.

I once used this extension: http://www.php.net/manual/en/intro.w32api.php but it wasn't maintained even then and had some bugs (like not being able to call functions with more than 3 parameters).

Re: Using PHP with windows API's. Possible?

Posted: Tue Feb 15, 2011 5:32 pm
by Weirdan
This extension looks promising btw http://winbinder.org/manual.php