RE: [PHP] How to eject cd-rom with php code?
| From: | Jim Moseby | Date: | Wed, 23 May 2007 12:30:36 +0000 |
| Subject: | RE: [PHP] How to eject cd-rom with php code? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-255389@lists.php.net to get a copy of this message | ||
> 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