Using COM with PHP
New to PHP 4 is support for COM on Windows operating systems. COM, which stands for Component Object Module, is a technology developed by Microsoft to control its applications via a programming language, notably Visual Basic. It is related to other Microsoft systems such as OLE (Object Linking and Embedding) and ActiveX.
Microsoft has defined every function and attribute that an application—such as Word or Excel—has as an object with methods and properties. Using the proper notation you can then control the application with Visual Basic or, in your case, PHP. You begin by creating a new object using the name of the application and PHP's com() function.
$word = new COM("word.application");
You can set the application to run ...
Get PHP Advanced for the World Wide Web: Visual QuickPro Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.