PHP获取远程.mp3文件的元数据(从URL) [英] PHP Get metadata of remote .mp3 file (from URL)
问题描述
我正在尝试从远程.mp3文件
(例如 em>
另外,此代码:
I am trying to get song name
/ artist name
/ song length
/ bitrate
etc from a remote .mp3 file
such as http://shiro-desu.com/scr/11.mp3 .
I have tried getID3 script but from what i understand it doesn't work for remote files as i got this error: "Remote files are not supported - please copy the file locally first"
Also, this code:
<?php
$tag = id3_get_tag( "http://shiro-desu.com/scr/11.mp3" );
print_r($tag);
?>
也不起作用.
致命错误:在第2行的/home4/shiro/public_html/scr/index.php中调用未定义的函数id3_get_tag()"
did not work either.
"Fatal error: Call to undefined function id3_get_tag() in /home4/shiro/public_html/scr/index.php on line 2"
推荐答案
您没有提到您的错误,我正在考虑常见的错误情况undefined function
As you haven't mentioned your error I am considering a common error case undefined function
The error you get (undefined function) means the ID3 extension is not enabled in your PHP configuration:
如果您没有Id3扩展名文件,只需在此处中进行检查安装信息.
If you dont have Id3 extension file .Just check here for installation info.
这篇关于PHP获取远程.mp3文件的元数据(从URL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!