RE: [PEAR] RE: [PEAR-DEV] RE: [PEAR] [ANNOUNCEMENT] HTTP_Request-1.0.2 (stable) Released.
| From: | BUSTARRET, Jean-Francois | Date: | Tue, 17 Sep 2002 10:41:23 +0000 |
| Subject: | RE: [PEAR] RE: [PEAR-DEV] RE: [PEAR] [ANNOUNCEMENT] HTTP_Request-1.0.2 (stable) Released. | ||
| Groups: | php.pear.dev php.pear.general | ||
| Request: | Send a blank email to pear-dev+get-9105@lists.php.net to get a copy of this message | ||
I was just looking at jpcache 1.1 (http://www.jpcache.com), which does some gzip stuff, based on
gzcompress/uncompress :
Here is the code :
$gzcontent = gzcompress($contents, 9);
...
if ($ENCODING)
{
// compressed output: set header
header("Content-Encoding: $ENCODING");
$ret = "\x1f\x8b\x08\x00\x00\x00\x00\x00";
$ret .= substr($gzcontents, 0, strlen($gzcontents) - 4);
$ret .= pack('V',$crc32);
$ret .= pack('V',$size);
}
else
{
// Darn, we need to uncompress :(
$ret = gzuncompress($gzcontents);
}
HTTP/1.1 can also deflate contents (Accept-Encoding/Content-Encoding: deflate). You **should** be
able to gzinflate them (never tried it).
Hope this helps...
Jean-François Bustarret
jfbus@php.net
> -----Message d'origine-----
> De : phpsurf [mailto:phpsurf@ifrance.com]
> Envoyé : mardi 17 septembre 2002 12:31
> À : BUSTARRET, Jean-Francois; PEAR general list;
> pear-dev@lists.php.net
> Objet : RE: [PEAR] RE: [PEAR-DEV] RE: [PEAR] [ANNOUNCEMENT]
> HTTP_Request-1.0.2 (stable) Released.
>
>
> right ! I know these pages, thanks ! :)
> the problem is that when you use gzip compression on a web server, the
> output is corresponds to the gzencode() function in php
> and there is no gzdecode() function in php !
> the gzuncompress() and gzdeflate() functions do not work on
> the result of a
> gzencode() !
>
> any other suggestions ?
>
> > -----Original Message-----
> > From: BUSTARRET, Jean-Francois [mailto:JFBUSTARRET@tf1.fr]
> > Sent: mardi 17 septembre 2002 12:21
> > To: phpsurf; PEAR general list; pear-dev@lists.php.net
> > Subject: [PEAR] RE: [PEAR-DEV] RE: [PEAR] [ANNOUNCEMENT]
> > HTTP_Request-1.0.2 (stable) Released.
> >
> >
> >
> > You could also add the deflate encoding, which is also supported
> > by HTTP/1.1.
> >
> > http://www.php.net/manual/en/function.gzuncompress.php
> > http://www.php.net/manual/en/function.gzdeflate.php
> >
> > Jean-François Bustarret
> > jfbus@php.net
> >
> >
> > > -----Message d'origine-----
> > > De : phpsurf [mailto:phpsurf@ifrance.com]
> > > Envoyé : mardi 17 septembre 2002 11:43
> > > À : PEAR general list; pear-dev@lists.php.net
> > > Objet : [PEAR-DEV] RE: [PEAR] [ANNOUNCEMENT]
> > > HTTP_Request-1.0.2 (stable)
> > > Released.
> > >
> > >
> > > Hi
> > >
> > > would anyone have any idea on how to add gzip support to the
> > > HTTP_Request
> > > class ?
> > > I tried to have a look on it, but didn't find how to ungzip a
> > > string with
> > > PHP !
> > >
> > >
> > > > -----Original Message-----
> > > > From: PEAR Announce [mailto:pear-dev@lists.php.net]
> > > > Sent: lundi 16 septembre 2002 20:19
> > > > To: PEAR general list
> > > > Subject: [PEAR] [ANNOUNCEMENT] HTTP_Request-1.0.2
> (stable) Released.
> > > >
> > > >
> > > > The new PEAR package HTTP_Request-1.0.2 (stable) has been
> > > > released at http://pear.php.net/.
> > > >
> > > > Release notes
> > > > -------------
> > > > Added cookie support
> > > >
> > > > Package Info
> > > > -------------
> > > > Supports GET/POST/HEAD/TRACE/PUT/DELETE, Basic
> > > authentication, Proxy,
> > > > Proxy Authentication etc.
> > > >
> > > > Related Links
> > > > -------------
> > > > Package home:
> > http://pear.php.net/package-info.php?package=HTTP_Request
> > > Changelog:
> > >
> > > http://pear.php.net/package-changelog.php?package=HTTP_Request
> > > Download:
> > > http://pear.php.net/get/HTTP_Request-1.0.2.tgz
> > >
> > > Authors
> > > -------------
> > > Richard Heyes <richard@phpguru.org> (lead)
> > >
> > >
> > > --
> > > PEAR General Mailing List (http://pear.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > ________________________________________________________________
> > Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92
> > euros d'économies !
> > Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
> > + 1 mois de jeu en réseau offert !
> > Clique ici : http://www.ifrance.com/_reloc/mail.etudiant
> >
> >
> > --
> > PEAR Development Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> ________________________________________________________________
> Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit
> 150,92 euros d'économies !
> Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
> + 1 mois de jeu en réseau offert !
> Clique ici : http://www.ifrance.com/_reloc/mail.etudiant
>
>