A simple OLE automation using COM

NicAx64 0 Tallied Votes 689 Views Share

well PHP is a powerfull text processing language designed mainly as a CGI ( common Gateway Interface ) programming language. But PHP supports rest of other features using the library extensions.
For a example you can call any win32 API call in your PHP script using the win32 API library extension.

Like this you can use COM to create COM objects ,

Oky , the code shown bellow will open a internet explore window and
navigate to a particular web site.

<?php

// create an InternetExplorer object
$internetExplorer = new COM ( "InternetExplorer.Application") or die ("cannot create an Internet Explore Object object") ;
$internetExplorer->Visible = 1;
$internetExplorer->Navigate("http://www.bit.lk");


?>
apradhan 0 Newbie Poster

Above code giving below error

Fatal error: Class 'COM' not found in /mnt/backup/home/apradhan/public_html/test/newbe.php on line 4

can you please let me know how I get this class.

psharma 0 Newbie Poster

For getting com conection error , you have to download the pear package of OLE.and install it in your web server

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.