简体   繁体   中英

Grabbing Information from a Remote MP3 File

I'm trying to extract MP3 ID3 Tag information from any remotely hosted mp3 file via PHP. I've tried several times with fread and fseek to grab the last 128bytes of the file and extract the tag information...but had no success.

Here's and example of what I want to do: http://www.digitalcoding.com/tools/read-remote-mp3-avi-file-id3-information.html

Any tips or code snippets would be appreciated :)

With HTTP you'd download a range of data from the resource. You can pick an arbitrary range and it can even consist of multiple parts like "XY" or "XY,AB" etc.

Servers however don't always support that and then you'll be served the full file instead.

When using something like curl, you can use its CURLOPT_RANGE option (or the command line tool's -r).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM