1
0
mirror of https://github.com/php/web-php.git synced 2026-03-24 07:12:16 +01:00
Files
archived-web-php/mirror-info.php
Gabor Hojtsy 0b29dc46fe Provide information about local stats (using new setenv). As not all sites are
updated to use this setting, we cannot be sure, that no env var means no local
stats, so provide "2" as a status code in that case...

Also provide default langauge setting (enhanced with env var setting now) back
to the central server...
2003-01-18 15:20:27 +00:00

32 lines
748 B
PHP

<?php
// Define $MYSITE and $LAST_UPDATED variables
include_once "prepend.inc";
// Try to find out if local search is possible
unset($htsearch_prog);
if (file_exists("configuration.inc")) {
include_once 'configuration.inc';
$searchtype = 2;
}
if (isset($_SERVER['HTSEARCH_PROG'])) {
$htsearch_prog = $_SERVER['HTSEARCH_PROG'];
$searchtype = 1;
}
if (!@is_executable($htsearch_prog)) {
unset($htsearch_prog);
}
if (!isset($htsearch_prog)) {
$searchtype = 0;
}
// Provide information on local stats setup
if (isset($_SERVER['MIRROR_STATS'])) {
$mirror_stats = 1; // Yes
} else {
$mirror_stats = 2; // Don't know
}
echo "$MYSITE|", phpversion(), "|$LAST_UPDATED|$searchtype|$mirror_stats|" , default_language();
?>