Does anyone know a script or class that can do this without copying the entire file to the local server?
Printable View
Does anyone know a script or class that can do this without copying the entire file to the local server?
Standard file functions such as fopen will (depending on the config) allow you to open a stream resource via HTTP (for example). From there you can read the ID3 tags as normal.
So if I opened the file with fopen, how could I then read the tags?
Probably not like that, right?Code:$file = fopen("http://www.google.com/song.mp3", "r");
$tags = id3_get_tag($file);
Exactly like that :) Although the function prototype in the manual states that the first argument is a string, the full notes say you can pass a valid stream resource instead. You do need to make sure you have the id3 pecl package installed though.
Code:pecl install id3
Thanks, I will try that in a bit!