Re: Downloading a binary file
| From: | Miguel J. Jiménez | Date: | Thu, 11 Jan 2007 23:38:00 +0000 |
| Subject: | Re: Downloading a binary file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246973@lists.php.net to get a copy of this message | ||
El Thu, 11 Jan 2007 14:59:36 -0500
"Sugrue, Sean" <Sean.Sugrue@analog.com> escribió:
> I need download a binary file in php. I don't need to read the
> contents just download the whole file to a browsed directory.
> I know you can use the header function, does anyone know the syntax.
>
> Sean
>
Maybe you can do:
<?php
$file = file_get_contents(<URI>); // Must have wrapper
activated
file_put_contents(<FILE>, $file);
?>
---
Miguel J. Jiménez
ISOTROL, S.A.
mjjimenez@isotrol.com
+34 955036800
+34 607448764
"I try to save a life a day. Usually it's my own."
John Crichton, FARSCAPE (1x07)