Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 8 of 8

Thread: USing PHP to get id3 info

  1. #1

    USing PHP to get id3 info

    Hay guys ive found this class:

    http://www.zend.com/codex.php?id=1393&single=1

    ...im very much new to php and was wonderign if anyone could show/explain how to get the size of the mp3 and its duration as well?!
    Last edited by Zaid_W1red; February 23rd, 2005 at 10:06 AM.

  2. #2
    Quote Originally Posted by Zaid_W1red
    Hay guys ive found this class:

    http://www.zend.com/codex.php?id=1393&single=1

    ...im very much new to php and was wonderign if anyone could show/explain how to get the size of the mp3 and its duration as well?!
    Can't be done with that class. Duration and size are not part of the ID3-tag. You can get the size by using basic PHP.

    http://fi.php.net/manual/en/function.filesize.php

    PHP Code:
     <?php

    // outputs e.g.  somefile.txt: 1024 bytes

    $filename 'somefile.txt';
    echo 
    $filename ': ' filesize($filename) . ' bytes';

    ?>
    Cybernoid

  3. #3
    as far as the duration goes... i'd recommend having a singluar bit rate and using division in the php
    got pwnt?

  4. #4
    woudl anyone know how to extract the lyrics from the mp3 also?!

  5. #5
    I could almost guarantee that extracting the lyrics is impossible.

  6. #6
    Quote Originally Posted by Zaid_W1red
    woudl anyone know how to extract the lyrics from the mp3 also?!
    ???

    There aren't any lyrics in the MP3. You can save lyrics with ID3V2, but V1 has no such field.

  7. #7
    well...

    there is a pretty good way to do it using php, sort of.
    what i have is a little thing that will take the variable of the songname and plug it in where it says american idiot and artist plugged in where it says green day

    when people click it, it goes to i'm feeling lucky for google which ALMOST always goes to the lyrics website.
    got pwnt?

  8. #8
    lol for any one that cares i j totally scrapped the idea of extracting the lyrics from the id3 and simply went for a database approach....letting the user add lyrics in a text field wher ethe file is uploaded...resul @ http://zaidcrowe.co.uk

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012