You are here: Re: Audio type « PHP Programming Language « IT news, forums, messages
Re: Audio type

Posted by Shelly on 11/15/53 11:22

"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:3k2de1dtkoe2os0dqltncubvj0h8tcman5@4ax.com...
> On Tue, 26 Jul 2005 16:34:01 GMT, "Shelly"
> <sheldonlg.news@asap-consult.com>
> wrote:
>
>>Now I ask if there is a similar function call for audio types. I want to
>>be
>>able to verify that the file I upload is, indeed, an audio file. I would
>>like this function because I am reasoning that if the "type" obtained from
>>$_FILES['the_field_name']['type'] is not reliable for images, then it
>>probably isn't reliable for audio either.
>
> 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.

Shelly

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация