The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


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