views:

66

answers:

3

I'm trying to download http://www.downway1.com/dota/eng/DotA%20Allstars%20v6.67.w3x this file. But it's not able to download. It's opening unknown text. How I can set it up? Maybe I can use htaccess? but how ?

+2  A: 

I can download it with google chrome and opera, so probably it's a browser related issue. Anyway, add to your .htaccess the following :

AddType application/octet-stream .w3x
Simone Margaritelli
thank you very much!
Ronnie Chester Lynwood
You are welcome, i had the same issue some time ago :)
Simone Margaritelli
+2  A: 

you can also make use of headers:

<?php
 // outputting the file
 header('Content-type: application/octet-stream');

 // It will be called DotA Allstars v6.67.w3x
 header('Content-Disposition: attachment; filename="DotA Allstars v6.67.w3x"');

 // The source file
 readfile('DotA Allstars v6.67.w3x');
?>
celalo
+1  A: 

Use the AddType directive to set the type for the .w3x file extension:

AddType application/octet-stream .w3x

The application/octet-stream media type is defined to describe arbitrary binary data and clients should not open it directly but download it.

Gumbo