7 languages, 3 pages (What/How/Start), 80-line router, 98KB total.
Features:
- No database, no Composer, no build step — just files on disk
- nginx PHP isolation: only index.php executes
- Bot detection with browser heuristic bypass
- Rate limiting, structured weekly logs, geo-location, Telegram alerts
- Multi-language: Accept-Language auto-detect, nav dropdown
- Article sub-page routing via /start/{slug}
- Apache + Caddy config alternatives documented in Start page
- Sample config — no real keys or secrets
15 lines
518 B
PHP
15 lines
518 B
PHP
<?php
|
|
# Set Site
|
|
if(empty($_SESSION)){
|
|
$_SESSION['ID']=generateCorrelationId();
|
|
$_SESSION['TIMESTAMP']=gmdate(DATE_ATOM);
|
|
$_SESSION['VISITOR'] = getVisitor();
|
|
$_SESSION['SITE']=array();
|
|
$_SESSION['SITE']['slug']='';
|
|
$_SESSION['SITE']['language']='';
|
|
$activeLanguage=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? 'en', 0, 2);
|
|
$supported = array_keys(LANGUAGES);
|
|
$_SESSION['SITE']['language'] = in_array($activeLanguage, $supported) ? $activeLanguage : 'en';
|
|
cleanupVelocityLog();
|
|
}
|
|
logging_requests();
|