@ 2013-10-17T10:59:27Z <?php
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('display_startup_errors', true);
$district = array(
// 'distrikt' => array(
// 'yoda'
// ),
'paderborn-stadtundland' => array(
'paderborn-stadtundland',
'paderborn-stadt-land',
'pbsl'
)
,'detmold-blomberg' => array(
'rotary-detmold-blomberg',
'rcdetmold-blomberg',
'detmold'
)
,'witten-hohenstein' => array(
'witten-hohenstein'
)
,'de-balt' => array(
'rotary-balticstates-germany',
'debalt'
)
,'essen-centennial' => array(
'rotary-essen'
)
,'schwerte' => array(
'rotaryclubschwerte'
)
,'luedenscheid-mark' => array(
'luedenscheidmark'
)
,'pirna' => array(
'pirna-saechsische-schweiz'
)
,'paderborn-buerener-land' => array(
'paderborn-buerenerland',
'buerener-land',
'rcpbbl'
)
,'essen-baldeney' => array(
'essen-ost'
)
,'paderborn-kaiserpfalz' => array(
'rcpbk',
'rotpbk'
)
,'loeningen-hasetal-haseluenne' => array(
'hasetal')
,'osterholz-scharmbeck' => array(
'osterholzscharmbeck')
,'haren-ems' => array(
'haren')
,'bad-bederkesa' => array(
'bederkesa')
,'hohenkarpfen-tuttlingen' => array(
'hohenkarpfen')
,'kelsterbach-rhein-main-international' => array(
'rmi')
);
// rc- entfernen
function removePrefixes($string){
$string = preg_replace('/^rc(-)?/', '', $string);
$string = preg_replace('/^rotary(-)?(club\.?-?)?/', '', $string);
return $string;
}
// echo $subdomain;
function domainistgleich($subdomain, $district){
foreach ($district as $key => $value) {
if (in_array($subdomain, removePrefixes($value))){
return $key;
}
}
return $subdomain;
}
// print_r($_SERVER);
// subdomain finden
if ($_GET['subdomain']) {
$subdomain = $_GET['subdomain'];
$subdomain = removePrefixes($subdomain);
$subdomain = array_shift(explode(".",$subdomain));
}
else{
$subdomain = $_SERVER['HTTP_HOST'];
$subdomain = removePrefixes($subdomain);
$subdomain = array_shift(explode(".",$subdomain));
}
$domain = domainistgleich($subdomain, $district);
print_r($_SERVER);
die 'aaa'.$domain;
if ($domain !== false){
if ($_GET['subdomain']) die($_SERVER['HTTP_HOST'].'/'.$domain);
// dauerhafte PHP-Weiterleitung (Statuscode 301)
header("HTTP/1.1 301 Moved Permanently");
// Weiterleitungsziel. Wohin soll eine permanente Weiterleitung erfolgen?
header("Location:".$_SERVER['HTTP_HOST'].$domain);
exit;
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.21 0.010 0.035 12.42 5.4.20 0.011 0.042 12.41 5.4.19 0.014 0.046 12.41 5.4.18 0.018 0.056 12.40 5.4.17 0.013 0.041 12.41 5.4.16 0.009 0.044 12.41 5.4.15 0.012 0.045 12.40 5.4.14 0.012 0.039 12.10 5.4.13 0.013 0.054 12.08 5.4.12 0.012 0.038 12.04 5.4.11 0.012 0.036 12.04 5.4.10 0.014 0.058 12.04 5.4.9 0.012 0.046 12.04 5.4.8 0.013 0.045 12.04 5.4.7 0.011 0.046 12.04 5.4.6 0.012 0.043 12.03 5.4.5 0.010 0.040 12.03 5.4.4 0.011 0.040 12.02 5.4.3 0.013 0.040 12.02 5.4.2 0.017 0.062 12.01 5.4.1 0.008 0.041 12.02 5.4.0 0.013 0.037 11.51 5.3.27 0.013 0.042 12.72 5.3.26 0.014 0.047 12.72 5.3.25 0.014 0.047 12.72 5.3.24 0.015 0.054 12.72 5.3.23 0.012 0.048 12.71 5.3.22 0.012 0.044 12.68 5.3.21 0.011 0.046 12.68 5.3.20 0.010 0.043 12.68 5.3.19 0.014 0.043 12.68 5.3.18 0.020 0.067 12.67 5.3.17 0.014 0.043 12.67 5.3.16 0.013 0.040 12.67 5.3.15 0.016 0.052 12.68 5.3.14 0.012 0.039 12.66 5.3.13 0.011 0.043 12.66 5.3.12 0.011 0.043 12.66 5.3.11 0.014 0.041 12.65 5.3.10 0.011 0.042 12.13 5.3.9 0.018 0.047 12.11 5.3.8 0.013 0.046 12.10 5.3.7 0.014 0.050 12.10 5.3.6 0.012 0.048 12.08 5.3.5 0.014 0.044 12.03 5.3.4 0.015 0.043 12.03 5.3.3 0.011 0.039 11.99 5.3.2 0.014 0.058 11.77 5.3.1 0.014 0.038 11.74 5.3.0 0.016 0.049 11.72
preferences:dark mode live preview
150.3 ms | 1394 KiB | 7 Q