David Krings wrote:
Aniesh joseph wrote:
Can someone suggests any method to find out the size of an audio file
such as http://example.com/myaudio.mp3 ?
>
Based on what php.net states, with PHP5.x and up you can use URLs with
stat(). HTTP and HTTPS are in the list of supported protocols.
You could also store the file size when you add the MP3 to the system,
but would need to back fill that information for the existing files.
Alternatively, you could put a script on example.com that returns the
file size for a named file, so that
http://example.com/getfilesize?file=audio1.mp3 returns a size in bytes.
But the better option is surely to use stat(), if you have php5.
- Allen
--
Allen Shaw
slidePresenter (http://slides.sourceforge.net)
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php