www.webdeveloper.com
Results 1 to 5 of 5

Thread: Reading ID3 tags from MP3's on a remote server

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Posts
    49

    Reading ID3 tags from MP3's on a remote server

    Does anyone know a script or class that can do this without copying the entire file to the local server?

  2. #2
    Join Date
    Nov 2008
    Posts
    2,477
    Standard file functions such as fopen will (depending on the config) allow you to open a stream resource via HTTP (for example). From there you can read the ID3 tags as normal.

  3. #3
    Join Date
    Dec 2007
    Posts
    49
    So if I opened the file with fopen, how could I then read the tags?
    Code:
    $file = fopen("http://www.google.com/song.mp3", "r");
    $tags = id3_get_tag($file);
    Probably not like that, right?

  4. #4
    Join Date
    Nov 2008
    Posts
    2,477
    Exactly like that Although the function prototype in the manual states that the first argument is a string, the full notes say you can pass a valid stream resource instead. You do need to make sure you have the id3 pecl package installed though.

    Code:
    pecl install id3

  5. #5
    Join Date
    Dec 2007
    Posts
    49
    Thanks, I will try that in a bit!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles