0

What I need is when user open, foe example, www.mydomain.com/install , he would be offered to download a file.

I made an index file in that folder with

<META HTTP-EQUIV="Refresh" CONTENT="0;URL=myfile.sis">

but on some devices instead of downloading, it would attempt to open and display the file in that strange hex(?) format.

any idea... thanks!

P.S.

<?php
header("Location: skyeye.sis");
exit;
?>

does the same.

Roger Travis
  • 8,402
  • 18
  • 67
  • 94

2 Answers2

3

You will need to send the right headers that force the browser to treat the file as a download.

You use PHP. This question gives one option. It would mean that you would have a PHP script be requested, and serve the SIS file.

If you use Apache, this should also be possible in a .htaccess file telling the web server to serve the right headers for the .sis file type - this would be less straining on the resources, as it is not handled by PHP.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
0

Thanks, looked up the header and it works!

<?php
header('Content-type: application/sis');
header('Content-Disposition: attachment; filename="sss.sis"');
readfile('sss.sis');
exit;
?>
Roger Travis
  • 8,402
  • 18
  • 67
  • 94
  • You're welcome, although you may want to use `application/octet-stream` as the content type, in case the client has an application that can handle sis files (and might open the file instead of downloading it.) – Pekka Jun 11 '10 at 18:09