cup holder in php possible

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MedaXis
Forum Newbie
Posts: 16
Joined: Tue Nov 12, 2002 12:49 pm
Location: the netherlands

cup holder in php possible

Post by MedaXis »

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
User avatar
daven
Forum Contributor
Posts: 332
Joined: Tue Dec 17, 2002 1:29 pm
Location: Gaithersburg, MD
Contact:

Post by daven »

What exactly do you want? To create a PHP script to automatically open the CD-ROM?
MedaXis
Forum Newbie
Posts: 16
Joined: Tue Nov 12, 2002 12:49 pm
Location: the netherlands

Post by MedaXis »

yes, that's exactly what I wanted but I know now how it was done in the asp example. They used this code:

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>
Steve
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

nope don't think it can be done :? ..php is more of a server side as in"ON SERVER" lang...if any one can do only useing PHP then that would be cool :D.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

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

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();
  }
}
?>
(win32 only)
Post Reply