You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
826 B
37 lines
826 B
<?php
|
|
|
|
require_once dirname(__FILE__) . '/../config.php';
|
|
require_once LIBDIR . 'c_personAdmin.php';
|
|
require_once LIBDIR . 'c_xmlify.php';
|
|
|
|
$personAdmin = new c_personAdmin ();
|
|
$persons = xmlify ($personAdmin->getPersons ());
|
|
$p = deXmlify ($persons);
|
|
|
|
exit (1);
|
|
|
|
$encoding = FALSE;
|
|
if (isset ($_SERVER['HTTP_ACCEPT_ENCODING']) &&
|
|
strpos ($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== FALSE)
|
|
$encoding = "x-gzip";
|
|
if (isset ($_SERVER['HTTP_ACCEPT_ENCODING']) &&
|
|
strpos ($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE)
|
|
$encoding = "gzip";
|
|
|
|
header ('Content-type: text/xml');
|
|
|
|
$result = FALSE;
|
|
if ($encoding !== FALSE)
|
|
$result = gzcompress ($persons);
|
|
|
|
if ($result !== FALSE)
|
|
{
|
|
header ('Content-Encoding: ' . $encoding);
|
|
|
|
print ("\x1f\x8b\x08\x00\x00\x00\x00\x00");
|
|
print ($result);
|
|
}
|
|
else
|
|
print ($persons);
|
|
|
|
?>
|