Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

COM & DCOM in PHP

Posted on 2001-07-09
5
Medium Priority
?
1,131 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:anupkarade
ID: 6267935
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
ID: 6268308
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 200 total points
ID: 6268714
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
ID: 6289700
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
ID: 6419303
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

670 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