PDA

View Full Version : [Help] asx files opening as a file



.:Jack120:.2
04-11-2007, 07:15 PM
Well on our radio, to play the radio in windows media player the file opens like a txt file instead of asking to save etc..
Does anyone know how to fix this?

Beau
05-11-2007, 04:56 AM
Well, unsure how to fix it so you can directly link it, but in the meantime, you can just use PHP to force the file to download:




$file = 'filename.asx';

header("Content-type: video/x-ms-asf");

header("Content-Disposition: attachment; filename=$file");

readfile("$file");



Change $file to suit the filename of the ASX file you're downloading. Upload to webhost, and when you want the ASX file to download, link that file instead. The result will be exactly the same.

.:Jack120:.2
05-11-2007, 05:53 PM
Well, unsure how to fix it so you can directly link it, but in the meantime, you can just use PHP to force the file to download:




$file = 'filename.asx';

header("Content-type: video/x-ms-asf");

header("Content-Disposition: attachment; filename=$file");

readfile("$file");

Change $file to suit the filename of the ASX file you're downloading. Upload to webhost, and when you want the ASX file to download, link that file instead. The result will be exactly the same.
Thanks you =]

Want to hide these adverts? Register an account for free!