DavidTigerch
MIS
Hi all .I have the following php script when i run it i get the following error. The remote file is downloadable in remote server and also in my php localhost the open is set to on but i still get the following errors . I be happy if some one tell how me how to fix it.Thanks
Bold parts are line 5 and 11
Code:
Warning: fopen([URL unfurl="true"]http://www.remotesite.com/song.mp3)[/URL] [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in \getid3\remote3.php on line 5
Fatal error: Call to a member function analyze() on a non-object in \getid3\remote3.php on line 13
Bold parts are line 5 and 11
Code:
<?
[b]if ($fp1 = fopen('[URL unfurl="true"]http://www.remotesite.com/song.mp3',[/URL] 'rb')) { [/b]
$tempname = tempnam('/tmp', 'foo');
if ($fp2 = fopen($tempname, 'wb')) {
fwrite($fp2, fread($fp, 102400));
fclose($fp2);
}
fclose($fp1);
}
[b]$getID3->analyze($tempname); [/b] line 13th
?>