Return to Snippet

Revision: 35065
at November 2, 2010 01:22 by Firsh


Updated Code
//PHP
<?php
function magicFunction($file){
//get the $length
  require_once('getid3.php');
  $getID3 = new getID3;
  $ThisFileInfo = $getID3->analyze($file);
  $length = $ThisFileInfo['playtime_string'];// or playtime_seconds that is preformatted
  echo "source=\"".$file."\" length=\"".$length."\" ";
}
?>

//XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35064
at November 2, 2010 01:21 by Firsh


Updated Code
//PHP
<?php
function magicFunction($file){
//get the $length
  require_once('getid3.php');
  $getID3 = new getID3;
  $ThisFileInfo = $getID3->analyze($file);
  $length = $ThisFileInfo['playtime_string'];// or playtime_seconds that is preformatted
  echo "source=\"".$file."\" length\"=".$length."\"";
}
?>

//XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35063
at November 2, 2010 01:21 by Firsh


Updated Code
//PHP
<?php
function magicFunction($file){
//get the $length
require_once('getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($file);
$length = $ThisFileInfo['playtime_string'];
echo "source=\"".$file."\" length\"=".$length."\"";
}
?>

//XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35062
at November 2, 2010 01:15 by Firsh


Updated Code
//PHP
function magicFunction($file){
//get the $length
echo "source=\"".$file."\" length\"=".$length."\"";
}

//XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35061
at November 2, 2010 01:14 by Firsh


Updated Code
function magicFunction($file){
/*get the legth here*/
echo "source=\"".$file."\" length\"=".$length."\"";
}

//THIS GOES INTO XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35060
at November 2, 2010 01:14 by Firsh


Updated Code
//THIS GOES  TO PHP

function magicFunction($file){
//get the legth here
echo "source=\"".$file."\" length\"=".$length."\"";
}

//THIS GOES INTO XML

<mp3 <?php magicFunction("some.mp3"); ?> />

Revision: 35059
at November 2, 2010 01:13 by Firsh


Updated Code
//THIS GOES INTO XML

<mp3 <?php magicFunction("some.mp3"); ?> />

//THIS TO PHP


function magicFunction($file){
//get the legth here
echo "source=\"".$file."\" length\"=".$length."\"";
}

Revision: 35058
at November 2, 2010 01:12 by Firsh


Initial Code
//THIS GOES INTO XML

<mp3 <?php magicFunction("some.mp3"); ?> />

//THIS TO PHP


function magicFunction($file){
//get the legth here
echo "source=\"some.mp3\" length\"=".$length."\"";
}

Initial URL

                                

Initial Description

                                

Initial Title
AS PHP MP3 length

Initial Tags

                                

Initial Language
PHP