You are here: RE: [PHP] Connecting to PHP « PHP « IT news, forums, messages
RE: [PHP] Connecting to PHP

Posted by tg-php on 12/19/05 21:24

No.. it sounds like he wants to make function calls to PHP from another app.. kind of the reverse of using PHP's COM calls.

I'm not aware that PHP has any registration in an OS or any kind of inherent "listening" mechanisms like COM has (I'm phrasing that poorly but you get the idea).

You can call PHP via command-line and tell it to execute a script or pass it PHP functions to execute.

You may be able to create something that actively hooks into the Windows API (or whatever your native OS's event handler is) and watches for certain events or conditions then responds to those events. But that would mean actively running a PHP script.


The idea with COM is that you can treat applications as objects. You call the object, perform functions, access internal objects and properties, get it to do some tricks, then unload the application. Sometimes without even seeing that app has been called.


If that's what you want to do with PHP... then it doesn't do it natively.


Kind of an interesting thought though.. register PHP as a COM-compliant object in Windows. Hmm.. Would require some kind of wrapper or whatever, but it'd open up PHP functionality to every Microsoft product (can you imagine calling PHP functions from within Access or Excel or Word?). Probably pointless because 99% of what you can do in PHP you can do in VBA.. not as elegantly I think (I've worked extensively in both) but someone may have a need.


Any thoughts?

-TG

= = = Original message = = =

[snip]
I know there are lots of ways to allow php to connect to components
written in other languages.
COM, EJB JAVA, .NET Components etc.

Is there any way for another language to use PHP as a component so that
all of it's amazing
functions could be shared? I don't suppose it exposes a COM interface
or anything of that sort?
[/snip]

PHP has COM functions http://www.php.net/com but I am unsure that this
answers your question.


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация