TrishZwei / php-reader

Automatically exported from code.google.com/p/php-reader
0 stars 0 forks source link

ID3v2 is not showing image of mp3 file #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I just use the php reader classes and simply calling functions there is no
other coding involved in this.
First of all it was showing this warning with the following code.

Warning: Cannot modify header information - headers already sent 
// Reference to this line: header("Content-Type: " . $id3->apic->mimeType)

require_once("ID3v2.php");
$id3 = new ID3v2("Billu.mp3");
header("Content-Type: " . $id3->apic->mimeType);
echo $id3->apic->imageData;

Then I change the code to this style

require_once("ID3v2.php");
$id3 = new ID3v2("Billu.mp3");
header('Content-Type: image/jpeg');
echo $id3->apic->imageData;

Now It is not showing warning instead of that it is just showing data in
binary form. I attached image with the mp3 file and it is jpeg. So what am
I missing.

I want to get other images attached to the mp3 file how can i get them
please show with reference of some coding.

Regards,
Tahir Mustafa

Original issue reported on code.google.com by Mr.Tahir...@gmail.com on 19 Nov 2009 at 4:51

GoogleCodeExporter commented 8 years ago
Please check that you have the lastest PHP version.

1) Your code must be placed before anything else is printed out

2) There is nothing wrong with the code, if you have an image it should show 
up. Are
you sure you have the image defined correctly? Can you see it with MP3tag for
example? If you still feel there is a bug please include a URL to your MP3 file 
so I
can debug it.

Original comment by svollbehr on 20 Nov 2009 at 4:43