Before I start anything, I'd like to acknowledge the work of Alain M. Samoun.
His articles on phpBuilder.com and phpclasses.org were fundamental in figuring out
how to interface to COM componentry, so thank you VERY much Alain!
The steps being followed in this tutorial are:
Check and modify php.ini settings.
Modify COM permissions to allow PHP to use the COM interface
Modify the applications COM permissions to allow the use of the interface.
Run test script
In the example I'm going to be detailing here, we will interface with a Excel
spreadsheet using its COM/DCOM interface in PHP.
The reason I chose Excel as the application to hook up with is as its one of the
more problematic programs to interface with, and if you can interface to Excel, you
can pretty much interface with ANYTHING!
Seeing as the title of this article is how to interface with COM objects with
PHP under Windows NT/2k/XP, you will need the following components:
Windows NT/2000/XP. I've tested this on Windows NT and XP so, Windows 2000 should be fine
IIS / Apache / web server of some type
PHP with COM support built in. I'm using version 4.3.1
Excel installed. I've tested this with Excel 98 and Excel 2000