Re: writing a binary file to a browser
| From: | Toby Butzon | Date: | Mon, 22 Jan 2001 05:22:12 +0000 |
| Subject: | Re: writing a binary file to a browser | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35953@lists.php.net to get a copy of this message | ||
Might want to check out fpassthru (http://www.php.net/fpassthru).
Good luck -
--Toby
----- Original Message -----
From: "Mike Chambers" <mesh@speakeasy.org>
To: <php-general@lists.php.net>
Sent: Monday, January 22, 2001 12:20 AM
Subject: [PHP] writing a binary file to a browser
> I am trying to open a binary file from a URL, and then send that file
back
> to the user's browser (after setting the appropriate content-type).
>
> I think i have a handle on how to open the file :
>
> using either fread() or file()
>
> however, i am not sure how to iterate through the bytes, get the file
size,
> and write the bytes back to the browser?
>
> can anyone point me in the correct direction? Even if it is just the
> function name, that is helpful as I can look up the info in the php
manual.
>
> thanks in advance....
>
> mike chambers
>
> mesh@speakeasy.org
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>