Re: Audio type
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Audio type

From: Andy Hassall <andy@andyh.co.uk>
Date: Tue Jul 26 2005 - 23:59:55 CEST

On Tue, 26 Jul 2005 20:44:13 GMT, "Shelly" <sheldonlg.news@asap-consult.com>
wrote:

>> There's the "mime magic" function:
>>
>> http://uk2.php.net/mime_content_type
>>
>> ... which looks for magic numbers in the file to make a decent guess as to
>> what format a file is. Not foolproof, but generally reasonable.
>
>Thanks, I'll try it. I looked at the URL you posted, but couldn't figure
>out what to look for to ascertain if it is an audio file. I assume that for
>an audio file it will output something like "audio/something" and I could
>check for the a match on the first five characters.

 Yes, that sounds right.

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Mon Oct 17 21:19:30 2005