Ik ben nu bezig met het maken van asx bestand. Het creeren van de asx dmv php lukt goed, maar als ik hem open dan zie ik geen lijst.

Maar als ik de asx bestand handmatig maak dan laat ie wel een lijst zien.

Weet iemand een oplossing.

M'n code:
<?php
header('Content-type: audio/x-ms-wma');
$path = 'files/audio/Junkie_XL';

echo '<asx version="3">
<title>'.$path.'</title>
<!-- Created by the IMC Playlist generator -->'.PHP_EOL;

$dir_handle = @opendir($path) or die('Unable to open '.$path);
while ($file = readdir($dir_handle))
{
$filename = $file;

if($file!='.' && $file!='..')
echo '<entry><ref href="http://localhost/imc/'.$path.'/'.$file.'" /><title>'.$file.'</title></entry>'.PHP_EOL;

}
closedir($dir_handle);
echo '</asx>';

?>
Misschien is het handig om de output van je zelf geschreven asx bestand te tonen en één van de door PHP gegenereerde?
door php:

<asx version="3">
<title>files/audio/Junkie_XL</title>
<!-- Created by the IMC Playlist generator --><entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Drift_away.mp3" /><title>Junkie_xl_-_Drift_away.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Even_in_this_moment.mp3" /><title>Junkie_xl_-_Even_in_this_moment.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Honey.mp3" /><title>Junkie_xl_-_Honey.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Ive_got_a_xerox_to_copy.mp3" /><title>Junkie_xl_-_Ive_got_a_xerox_to_copy.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Such_a_tease.mp3" /><title>Junkie_xl_-_Such_a_tease.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Today.mp3" /><title>Junkie_xl_-_Today.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_We_become_one.mp3" /><title>Junkie_xl_-_We_become_one.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Yesterdays.mp3" /><title>Junkie_xl_-_Yesterdays.mp3</title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Youthfull.mp3" /><title>Junkie_xl_-_Youthfull.mp3</title></entry>
</asx>


zelf:
<asx version="3">
<title>/files/audio/Junkie_XL/</title>
<!-- Created by the IMC Playlist generator -->
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Drift_away.mp3" /><title></title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Even_in_this_moment.mp3" /><title></title></entry>
<entry><ref href="http://localhost/imc/files/audio/Junkie_XL/Junkie_xl_-_Honey.mp3" /><title></title></entry>
</asx>
volgens mij geef je der verkeerde header mee, maar dat weet ik niet zeker

Reageren