Commit 5e0339d3 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 8ae56659
...@@ -161,15 +161,18 @@ class Media { ...@@ -161,15 +161,18 @@ class Media {
$befehl = 'mediainfo --Output=XML "'.$Pfad.$FilenameOrg.'" > /tmp/'.$array["imdbID"].'.xml'; $befehl = 'mediainfo --Output=XML "'.$Pfad.$FilenameOrg.'" > /tmp/'.$array["imdbID"].'.xml';
exec($befehl); exec($befehl);
//echo $befehl; //echo $befehl;
$xml = file_get_contents('/tmp/'.$array["imdbID"].'.xml'); $xmlstring = file_get_contents('/tmp/'.$array["imdbID"].'.xml');
echo $xml; /*echo $xml;
xml_parse_into_struct($p, $xml, $vals, $index); xml_parse_into_struct($p, $xml, $vals, $index);
xml_parser_free($p); xml_parser_free($p);*/
$xml = simplexml_load_string($xmlstring);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
print_r($index); print_r($array);
print_r($vals); //print_r($vals);
foreach ($array as $key => $value) { foreach ($array as $key => $value) {
echo " ".$key." => '".$value."'".PHP_EOL; echo " ".$key." => '".$value."'".PHP_EOL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment