RE: How to eject cd-rom with php code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi all,
> I am writing a script and need to eject the cd-rom drive at 
> some point.
> Does anyone have an idea how to do this?
> This is a simple command isn't it?
> I greatly appreciate your help
> Blessings,
> Chetanji

Found this little snippet on the php.net site. (
http://us2.php.net/manual/en/ref.com.php) 

Might work for you:

Using the Windows Media Player OCX and the latest snap of PHP 5.1 i was able
to eject a CD-ROM drive

<?php
//create an instance of Windows Media Player
$mp = new COM("WMPlayer.OCX");
//ejects the first cd-rom on the drive list
$mp->cdromcollection->item(0)->eject();

?>

HTH

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux