Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2013
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    getID3 and echo thumbnail?

    Can someone for the love of god please explain to me how to simply install getid3 and in php just simply display the thumbnail?

    Can you show me an example on how to just echo the thumbnail?

    Also I'm not using a mp3 URL I'm using $randomfile

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Installation is not so simple. This requires you to obtain the PECL install for the id3 library, and according to the installer, there is no pre-built DLL for it which means you need to compile the source for it if you use windows. So the best I can do for help on that is to give you the link for it here: http://www.php.net/manual/en/id3.installation.php
    As for *what* it'll have an image in, I'm not sure. PHP's offsets do not directly correspond to the file structure from the looks of it, and the documentation for the id3 makes me question if its even available.

    If you have some patience and are fairly good with bit mathematics, you can actually do everything manually by following the specification for the file structures. I found that here for version 2.3: http://id3.org/id3v2.3.0. There is also a id3v2.4.0 available. Structure appears fairly straight forward. May need some combinations with mp3's directly, but I'm thinking its a wrapper for the mp3 itself.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Mar 2013
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I thought since php 5 that you didn't actually need to install anything anymore and it was native?

  • #4
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts
    i don't know if this will help you, but if you heve shell access to your server (or at least you can run scripts uploaded over ftp), then you could use this:
    http://freecode.com/projects/eyed3 or this for windows: http://mp3imagetagextr.sourceforge.n...eTagExtractor/

    you could use those with shell_exec()

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by splinnershh View Post
    I thought since php 5 that you didn't actually need to install anything anymore and it was native?
    Nope, the api specifies that id3 is PECL extension, unless they're super behind on updating the docs.
    Personally I'd just write my own based on the id3 documentation. Probably wouldn't use it in production, but I like implementing based on structure.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    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
    •