Hi guys, I need your help!
I have written a piece of code that creates a file titled "playlist.m3u". I want to further develop the code so that the file "playlist.m3u" will be automatically played as soon as it is created through winamp. I have tried to use the exec() and system() functions but I couldn't get it to work. Are there any other commands I should know of? This is the code I have written:
<?php
if(isset($POST['action']) AND $POST['action']=1){
$filename = "c:/Temp/playlist.m3u";
$m3u=fopen($filename, "w") or die("cannot open $filename");
$selected=$_POST['selected'];
foreach($selected as $file){
fwrite($m3u,$file."\r\n");
}
fclose($m3u);
echo exec($filename);
}
?>
Is there someone who can help me?
Thanks in advance!