[PHP] reading CD information

2003-02-05 Thread Adam Williams
Is it possible to have PHP read cd label information?  You know in windows
like after you put in a CD and use Windows Explorer and go to your CD rom
drive's letter it will say like D: (MSOffice2K) or D: (date of burned cd)
or D: (XPProCD), etc...If you know what I am talking about, is there a way
to have PHP read that cd label?

Adam


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




Re: [PHP] reading CD information

2003-02-05 Thread Chris Shiflett
--- Adam Williams [EMAIL PROTECTED] wrote:
 Is it possible to have PHP read cd label information?

Yes.

I have never done this myself, but I know of at least one
or two open source projects that read information such as
that from a CD. They usually go one step better and
communicate with opendb.org to get a good bit of
information, such as genre, artist, album name, track
titles, etc.

You might want to just find an open source project that
does something similar and see how they did it.

Chris

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




RE: [PHP] reading CD information

2003-02-05 Thread Jon Haworth
Hi Adam,

 Is it possible to have PHP read cd label information?  

Where is the CD? 

If it's in the CD-ROM drive of the webserver: probably.
If it's in the CD-ROM drive of a visitor to your website: no.

Cheers
Jon

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




RE: [PHP] reading CD information

2003-02-05 Thread Adam Williams
It would be in the cd-rom drive of the webserver.  The CD's would be
rotated periodically and the only way I have to identify what is on each
cd and which .exe to run on it is by identifying it by its cd label.  I've
searched google and php.net but haven't found a function that can read cd
labels.  Any help is appreciated.

Adam

On Wed, 5 Feb 2003, Jon Haworth wrote:

 Hi Adam,

  Is it possible to have PHP read cd label information?

 Where is the CD?

 If it's in the CD-ROM drive of the webserver: probably.
 If it's in the CD-ROM drive of a visitor to your website: no.

 Cheers
 Jon




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




Re: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
Hi,

Thursday, February 6, 2003, 3:06:29 AM, you wrote:
AW Is it possible to have PHP read cd label information?  You know in windows
AW like after you put in a CD and use Windows Explorer and go to your CD rom
AW drive's letter it will say like D: (MSOffice2K) or D: (date of burned cd)
AW or D: (XPProCD), etc...If you know what I am talking about, is there a way
AW to have PHP read that cd label?

AW Adam


You could try the vol command using exec{} and parse out the volume name

-- 
regards,
Tom


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




Re[2]: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
Hi,   Adam


TR You could try the vol command using exec{} and parse out the volume name

TR -- 
TR regards,
TR Tom

This should do it:
?
exec(vol g:,$result);
$label = trim(strrchr($result[0],' '));
echo 'Label is '.$label.'br';
?

-- 
regards,
Tom


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




Re[2]: [PHP] reading CD information

2003-02-05 Thread Adam Williams
Thanks Tom, that works perfect!

Adam

On Thu, 6 Feb 2003, Tom Rogers wrote:

 Hi,   Adam


 TR You could try the vol command using exec{} and parse out the volume name

 TR --
 TR regards,
 TR Tom

 This should do it:
 ?
 exec(vol g:,$result);
 $label = trim(strrchr($result[0],' '));
 echo 'Label is '.$label.'br';
 ?




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




Re: [PHP] reading CD information

2003-02-05 Thread John Nichel
Guess it's not on Linux, eh?  :)

Adam Williams wrote:

Thanks Tom, that works perfect!

			Adam

On Thu, 6 Feb 2003, Tom Rogers wrote:



Hi,   Adam


TR You could try the vol command using exec{} and parse out the volume name

TR --
TR regards,
TR Tom

This should do it:
?
exec(vol g:,$result);
$label = trim(strrchr($result[0],' '));
echo 'Label is '.$label.'br';
?









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




Re: [PHP] reading CD information

2003-02-05 Thread Adam Williams
Unfortunately not.  I'm putting PHP on a windows 95 computer and the
person will put a cdrom into the cd drive.  Then they will double click on
a shortcut that will run the php executable with script, and the script
will read the cd label.  depending on what the cd label is, it will call
the correct .exe file on it to load the application.

Its for a library and will be used by the general public, so I am making
it as simple as possible :)

Adam

On Wed, 5 Feb 2003, John Nichel wrote:

 Guess it's not on Linux, eh?  :)

 Adam Williams wrote:


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




Re[2]: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
Hi,

Thursday, February 6, 2003, 4:49:23 AM, you wrote:
JN Guess it's not on Linux, eh?  :)

JN Adam Williams wrote:
 Thanks Tom, that works perfect!
 
   Adam
 
 On Thu, 6 Feb 2003, Tom Rogers wrote:
 
 
Hi,   Adam


TR You could try the vol command using exec{} and parse out the volume name

TR --
TR regards,
TR Tom

This should do it:
?
exec(vol g:,$result);
$label = trim(strrchr($result[0],' '));
echo 'Label is '.$label.'br';
?


 
 

For linux you could read the header using dd

-- 
regards,
Tom


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