PDA

View Full Version : Downlaod wmv format file.


phpbaby
12/21/2005, 00:50
Hello All,

I used <a href='video/myvideo.wmv'>Click Here to Download</a>

This comment works in Firefox & netscape. If we click the video downloads in Firefox & netscape. But when we click the link in ie it opens the video in the leftsite under the toolbar heading 'Media'. I think this is due to both are MS products.

I think you got my points. So is there any script to download wmv format video using php code or even javascript.


Regards
Marie

hexadesigns
12/21/2005, 04:03
Why not use
<a href='video/myvideo.zip'>Click Here to Download</a>

where myvideo.zip = myvideo.wmv zipped up.

No matter what you use IE will always try to open WMV in the media player! :D

olegk
12/21/2005, 06:41
just send file through headers

$filecontent="Some text/code im creating in the script";
$downloadfile="somefile.txt";
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".strlen($filecontent));
header("Pragma: no-cache");
header("Expires: 0");

http://php.net/header