Re: Compression
| From: | Matthias Schniedermeyer | Date: | Sun, 23 Jul 2000 21:31:49 +0000 |
| Subject: | Re: Compression | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7785@lists.php.net to get a copy of this message | ||
#include <hallo.h>
> > > Make sure you check that the browsers accept that encoding.
> > >
> > > As far as I know, only the latest versions of netscape and the the past
> > > few of IE allow that ;O)
> >
> > $HTTP_ACCEPT_ENCODING
> >
> > Thats the smallest problem, if i can send all output compressed.
>
> Can you use the gzopen, gzputs and redirect to the new file you created?
>
> The server will have to work a little more but it will save you in bandwith
> ;O)
Very unelegand. The "beautifullest" way IMHO is (Perl-Syntax!)
if ($HTTP_ACCEPT_ENCODING ~= /gzip/)
{
send_output_compressed(gzip,<Compression_Level>);
}
Bis denn
--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.