troubleshooting Question

PHP COM: How to find out what methods are available

Avatar of Victor Kimura
Victor KimuraFlag for Canada asked on
2 Comments1 Solution308 ViewsLast Modified:

I'm just looking at the PHP COM class. I'm looking that the example code and it looks pretty powerful. I'm wondering how do I find out if I can open up, say, Quickbooks using the PHP COM and how do I open and what functions are available. It seems like the functions that will be available is different for each program.

So, for CrystalReports, the code is like. I obtained it from the site::

$ObjectFactory= New COM("CrystalReports11.ObjectFactory.1");
  $crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application");
  $creport = $crapp->OpenReport($my_report, 1);
Item(1)->ConnectionProperties['User ID'] =  'blablabla'; 

How does one know that the COM object for CrystalReports11.ObjectFactory.1 has the functions CreateObject and OpenReport?

Specifically, I'd like to call Quickbooks. On the page it states:
Can be a ProgID, Class ID or Moniker that names the component to load. A ProgID is typically the application or DLL name, followed by a period, followed by the object name. e.g: Word.Application. A Class ID is the UUID that uniquely identifies a given class. A Moniker is a special form of naming, similar in concept to a URL scheme, that identifies a resource and specifies how it should be loaded. As an example, you could load up Word and get an object representing a word document by specifying the full path to the word document as the module name, or you can use LDAP: as a moniker to use the ADSI interface to LDAP.

How do I know the ProgID for Quickbooks and the object name following the period like:
$word = new COM("word.application") or die("Unable to instantiate Word");

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros