kevinnaing
Programmer
Hi,
My code is as follows:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header ("Content-type: video/x-ms-asf");
echo "<ASX Version=\"3\">";
echo "\r\n";
echo "<TITLE> testing" . "</TITLE>";
$tmp = "album";
if ($tmp == $_GET['musictype']){
$filelist = @mysql_query("select * from my_songs where albumid=".$_GET['id'],$link);
while($rowlist=@mysql_fetch_array($filelist)){
echo "\r\n". "<ENTRY>";
echo "\r\n";
//echo "<REF HREF=\"" . $path . $rowlist['fullpath'] . "\"/>";
echo "<REF HREF=\"" . "mms://localhost/music/audi01s/sh/APyoSin.wma" . "\"/>";
echo "\r\n";
echo "</ENTRY>";
}
} else {
$filename = $path . $filename;
}
echo "\r\n" . "</ASX>";
=============================
The output of that file will be sent to another php file with embedded media player.Problem is media player can not play. Database queries are correct and I placed database connection codes in other file. If I remove (if statements and while loop for database access), it works. Any advice? Please.
My code is as follows:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header ("Content-type: video/x-ms-asf");
echo "<ASX Version=\"3\">";
echo "\r\n";
echo "<TITLE> testing" . "</TITLE>";
$tmp = "album";
if ($tmp == $_GET['musictype']){
$filelist = @mysql_query("select * from my_songs where albumid=".$_GET['id'],$link);
while($rowlist=@mysql_fetch_array($filelist)){
echo "\r\n". "<ENTRY>";
echo "\r\n";
//echo "<REF HREF=\"" . $path . $rowlist['fullpath'] . "\"/>";
echo "<REF HREF=\"" . "mms://localhost/music/audi01s/sh/APyoSin.wma" . "\"/>";
echo "\r\n";
echo "</ENTRY>";
}
} else {
$filename = $path . $filename;
}
echo "\r\n" . "</ASX>";
=============================
The output of that file will be sent to another php file with embedded media player.Problem is media player can not play. Database queries are correct and I placed database connection codes in other file. If I remove (if statements and while loop for database access), it works. Any advice? Please.