problem analyzeing remote files over HTTP

The place for "I can't figure out how to..." questions.
Locked
tony98
User
Posts: 23
Joined: Mon Feb 13, 2006 5:47 am

problem analyzeing remote files over HTTP

Post by tony98 » Fri Apr 28, 2006 12:20 pm

Hi all i tried the following php script but when i run it i get the following error:

Code: Select all

Parse error: syntax error, unexpected ';', expecting ')' in www\remote.php on line 35
I put ')' after Arry( to make it like Array() but still i get the above error. So i be happy if an expert tell me how to fix it. This is the script was given in read me file of getID3 but with out write.php. could u guys tell meme where to find write.php.Thanks


The bold part shows the error line:

Code: Select all

<?

// Copy remote file locally to scan with getID3()
$remotefilename = 'http://ww.remoteserver.com/song.mp3';
if ($fp_remote = fopen($remotefilename, 'rb')) {
    $localtempfilename = tempnam('/tmp', 'getID3');
    if ($fp_local = fopen($localtempfilename, 'wb')) {
        while ($buffer = fread($fp_remote, 8192)) {
            fwrite($fp_local, $buffer);
        }
        fclose($fp_local);

		// Initialize getID3 engine
		$getID3 = new getID3;

		$ThisFileInfo = $getID3->analyze($filename);

        // Delete temporary file
        unlink($localtempfilename);
    }
    fclose($fp_remote);
}


// Writing tags:
require_once('getid3.php');
$getID3 = new getID3;
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
$tagwriter = new getid3_writetags;
$tagwriter->filename   = $Filename;
$tagwriter->tagformats = array('id3v2.3', 'ape');
$TagData['title'][]  = 'Song Title';
$TagData['artist'][] = 'Artist Name';
[b]$tagwriter->tag_data = array(;[/b] ===> error here
if ($tagwriter->WriteTags()) {
	echo 'success';
} else {
	echo 'failure';
}


<?

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Mon May 01, 2006 1:08 pm

Sorry, this is a getID3() support forum, not a general PHP support forum.

Locked