I just saw this done in with asp and I was wondering if it could be done using php
for those who don't know what I am talking about, the cup holder is the cd drive that opens
Steve
cup holder in php possible
Moderator: General Moderators
yes, that's exactly what I wanted but I know now how it was done in the asp example. They used this code:
Steve
Code: Select all
<SCRIPT language=VBScript>
<!--
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If
-->
</SCRIPT>that's neither asp nor php. It's a client-side script only working with ie on win32 (and only if windows media player 7 is installed on that client) 
e.g. http://www.1337-clan.de/cdrom.gif
a php-version ejecting all cd-roms on the server(!) would be(win32 only)
e.g. http://www.1337-clan.de/cdrom.gif
a php-version ejecting all cd-roms on the server(!) would be
Code: Select all
<?php
$wm = new COM("WMPlayer.OCX.7");
$colCDROMs = $wm->cdromCollection;
if ($colCDROMs->Count >= 1)
{
for($i=0; $i < $colCDROMs->Count; $i++)
{
$item = $colCDROMs->Item($i);
$item->Eject();
}
}
?>