I am running mandrake 7.2 with php 4.04pl1 and am trying to dynamically create .ram files for real player through a form. All the .rm files are uploaded to the proper directories and then this is the code that generates the .ram file:
//////////////////////////
if ($audio != ''):
$file = "path" . $audio . ".ram";
$fp = fopen($file , "w");
fputs($fp, "rstp://path" . $audio . ".rm");
chmod($file, 0755);
fclose($fp);
;endif
/////////////////////////
it generates the file and sets the permissions fine, but Real Player gives an "invalid metafile" error when i try to play it from a link. The odd thing is, when i manually generate the .ram file and set the permissions - it works fine. Comparing the manual generated .ram and the dynamic .ram - they look identical, but the one PHP generates will not work in real player. Anyone have any ideas as to why this would happen? maybe the php file is not ture plain text or something? any help would be appreciated!