Solved

COM & DCOM in PHP

Posted on 2001-07-09
5
1,082 Views
Last Modified: 2007-10-18
I was wondering what the support for COM/DCOM..
especially DCOM was for PHP..

We are going to run on a unix box/apache
and then try and talk to a remote DCOM
object (on an NT server)..

Is this possible?
Or would we have to run PHP on windows?
Or would it be best to stick with (!) ASP for this one?

Thanks,

Steve Dangerfield.
stevedangerfield@angelfire.com
0
Comment
Question by:stevedangerfield
5 Comments
 
LVL 1

Expert Comment

by:anupkarade
Comment Utility
Hi
  Yess php supports com
  here is th link for you

  http://www.phpbuilder.com/manual/ref.com.php

and a small piece of code......
  paste it and enjoy...

<?
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>          
           
                                   regards..
                                     Anup
0
 

Author Comment

by:stevedangerfield
Comment Utility
thanks for that..
i previously had seen that..
but was wondering..
is this support only on windows NT version of PHP?
i guess it must be, for COM is a windows thing..
but for DCOM where the object exists
on a remote machine.. a remote NT machine..
can you use PHP (under linux) to call the remote
object?
thats the question..
0
 
LVL 1

Accepted Solution

by:
manucorp earned 50 total points
Comment Utility
yes PHP4 support both COM and DCOM
http://www.zend.com/zend/whats-new.php

"COM/DCOM support
PHP 4.0 provides COM/DCOM support (on Windows only) for seamlessly accessing COM objects and instantiating them."

juste write new COM(); with a good string call to DCOM object
0
 
LVL 1

Expert Comment

by:rumblefiz
Comment Utility
i think the machine you are trying to access the dcom server (the one running php) is going to need to be on windows. i beleive com is windows specific. if you are going to be doing alot of com/dcom work i would recommend sticking w/ asp on this one. asp's support for com is alot better than php since microsoft is responsible for asp and com. hope that helps.

rumblefiz
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now