Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: pap_envoi.inc.php,v 1.10 2007-04-13 09:41:09 neiluj Exp $
|
22 |
// CVS : $Id: pap_envoi.inc.php,v 1.11 2007-06-25 15:44:32 jp_milcent Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Gestion de l'envoie des pages à afficher.
|
24 |
* Gestion de l'envoie des pages à afficher.
|
25 |
*
|
25 |
*
|
26 |
* Ce fichier envoi les données en les compressant si possible.
|
26 |
* Ce fichier envoi les données en les compressant si possible.
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
30 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Laurent COUDOUNEAU <lc@gsite.org>
|
32 |
*@author Laurent COUDOUNEAU <lc@gsite.org>
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.10 $ $Date: 2007-04-13 09:41:09 $
|
34 |
*@version $Revision: 1.11 $ $Date: 2007-06-25 15:44:32 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
// | ENTÊTE du PROGRAMME |
|
39 |
// | ENTÊTE du PROGRAMME |
|
Line 40... |
Line 40... |
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
|
- |
|
42 |
function pap_compress_output($output)
|
41 |
|
43 |
{
|
42 |
function pap_compress_sortie($output) {
|
Line 44... |
Line 43... |
44 |
return gzencode($output);
|
43 |
return gzencode($output);
|
45 |
}
|
44 |
}
|
46 |
|
- |
|
47 |
// Check if the browser supports gzip encoding, HTTP_ACCEPT_ENCODING
|
45 |
|
48 |
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') )
|
- |
|
49 |
{
|
46 |
// Nous vérifions si le navigateur supporte la compression, HTTP_ACCEPT_ENCODING
|
50 |
// Start output buffering, and register compress_output() (see
|
- |
|
51 |
// below)
|
47 |
if (strstr ($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
|
52 |
ob_start ("pap_compress_output");
|
48 |
// Nous mettons en buffer la sortie et nous demandons l'appel de la fonction de compression (voir ci-dessus)
|
53 |
|
49 |
ob_start ('pap_compress_sortie');
|
Line 54... |
Line 50... |
54 |
// Tell the browser the content is compressed with gzip
|
50 |
// Nous prévenons le navigateur que le contenu est compressé avec gzip
|
Line 55... |
Line 51... |
55 |
header ("Content-Encoding: gzip");
|
51 |
header ('Content-Encoding: gzip');
|
56 |
}
|
52 |
}
|
57 |
|
53 |
|
- |
|
54 |
echo($GLOBALS['_GEN_commun']['sortie']);
|
- |
|
55 |
|
- |
|
56 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
58 |
echo($_GEN_commun['sortie']);
|
57 |
*
|
59 |
|
58 |
* $Log: not supported by cvs2svn $
|
60 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
59 |
* Revision 1.10 2007-04-13 09:41:09 neiluj
|
61 |
*
|
60 |
* réparration cvs
|
62 |
* $Log: not supported by cvs2svn $
|
61 |
*
|