<?php
require_once __DIR__ . "/../Febe.php";
$febe = new Febe;
$febe->setCurrentSubFolderLanguageCookie();
$contentType = "";
$availableContentTypes = array("nopwd", "genpwd");
if (!empty($_GET["intgrtn_contentType"])) {
	if (in_array($_GET["intgrtn_contentType"], $availableContentTypes)) {
		$contentType = $_GET["intgrtn_contentType"];
	}
}
function getTrackingUrl(): string
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://server.4markets.net/api/v2/offers/tracking-domain");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "Referer: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
    ]);
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

    if ($httpCode != 200) {
        return "";
    }
    if (empty($response)) {
        return "";
    }

    $responseTrackingDomainJson = json_decode($response);

    if (empty($responseTrackingDomainJson)) {
        return "";
    }

    return $responseTrackingDomainJson->details->endpoint;
}

$trackingUrl = getTrackingUrl();
?>
<!doctype html>
<html lang="en-GB" prefix="og: https://ogp.me/ns#">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>

    <title><?= $title; ?></title>
    <base href="<?= $febe->getHref(); ?>">

    <meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/>

    <link rel='stylesheet' id='hello-elementor-css' href='assets/hello-elementor/style.min6fca.css?ver=2.6.3' media='all'/>
    <link rel='stylesheet' id='hello-elementor-theme-style-css' href='assets/hello-elementor/theme.min6fca.css?ver=2.6.3' media='all'/>
    <link rel='stylesheet' id='widget.css-css' href='assets/hello-elementor/widget6fca.css?ver=2.6.3' media='all'/>
    <link rel='stylesheet' id='elementor-icons-css' href='assets/elementor/assets/lib/eicons/css/elementor-icons.min91ce.css?ver=5.16.0' media='all'/>
    <link rel='stylesheet' id='elementor-frontend-legacy-css' href='assets/elementor/assets/css/frontend-legacy.minf43b.css?ver=3.7.1' media='all'/>
    <link rel='stylesheet' id='elementor-frontend-css' href='assets/elementor/assets/css/frontend-lite.minf43b.css?ver=3.7.1' media='all'/>
    <link rel='stylesheet' id='elementor-post-10-css' href='css/post-10c322.css?ver=1660817865' media='all'/>
    <link rel='stylesheet' id='elementor-pro-css' href='assets/elementor-pro/assets/css/frontend-lite.min1ac1.css?ver=3.7.3' media='all'/>
    <link rel='stylesheet' id='elementor-global-css' href='css/global88fe.css?ver=1660817866' media='all'/>
    <link rel='stylesheet' id='elementor-post-16-css' href='css/post-16955e.css?ver=1660821168' media='all'/>
    <link rel='stylesheet' id='google-fonts-1-css' href='https://fonts.googleapis.com/css?family=Roboto%3A100%2C100italic%2C200%2C200italic%2C300%2C300italic%2C400%2C400italic%2C500%2C500italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%2C900%2C900italic%7CRoboto+Slab%3A100%2C100italic%2C200%2C200italic%2C300%2C300italic%2C400%2C400italic%2C500%2C500italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%2C900%2C900italic&amp;display=auto&amp;ver=6.0.1' media='all'/>
    <link rel='stylesheet' id='elementor-icons-shared-0-css' href='assets/elementor/assets/lib/font-awesome/css/fontawesome.min52d5.css?ver=5.15.3' media='all'/>
    <link rel='stylesheet' id='elementor-icons-fa-solid-css' href='assets/elementor/assets/lib/font-awesome/css/solid.min52d5.css?ver=5.15.3' media='all'/>
    <link rel='stylesheet' id='elementor-icons-fa-regular-css' href='assets/elementor/assets/lib/font-awesome/css/regular.min52d5.css?ver=5.15.3' media='all'/>
    <link rel='stylesheet' id='elementor-icons-fa-brands-css' href='assets/elementor/assets/lib/font-awesome/css/brands.min52d5.css?ver=5.15.3' media='all'/>

    <script src='js/jquery-1.11.3.min.js'></script>

    <script src='js/jquery.minaf6c.js?ver=3.6.0' id='jquery-core-js'></script>
    <script src='js/jquery-migrate.mind617.js?ver=3.3.2' id='jquery-migrate-js'></script>

    <link rel="icon" href="img/cropped-favicon-32x32.jpg" sizes="32x32"/>
    <link rel="icon" href="img/cropped-favicon-192x192.jpg" sizes="192x192"/>
    <link rel="apple-touch-icon" href="img/cropped-favicon-180x180.jpg"/>
    <meta name="msapplication-TileImage" content="img/cropped-favicon-270x270.jpg"/>
    <style id="wp-custom-css">
        header.site-header {
            display: none !important;
        }

        .site-branding {
            display: none;
        }

        a {
            font-size: 100% !important;
        }
    </style>

    <link rel="stylesheet" href="css/main.css">

    <link rel="stylesheet" href="css/intgrtn.css">

    <link rel="stylesheet" href="css/global.css"/>
    <link rel="stylesheet" href="css/post-10.css"/>
    <link rel="stylesheet" href="css/frontend-lite.min.css"/>
    <link rel="stylesheet" href="css/frontend-lite-2.min.css"/>
    <link rel="stylesheet" href="css/frontend-legacy.min.css"/>
    <link rel="stylesheet" href="css/style.min.css"/>
    <link rel="stylesheet" href="css/widget-nav-menu.min.css"/>
    <link rel="stylesheet" href="css/widget-icon-box.min.css"/>
    <link rel="stylesheet" href="css/post-41074.css"/>
    <link rel="stylesheet" href="css/post-41077.css"/>
    <link rel="stylesheet" href="css/post-44656.css" />
    <link rel="stylesheet" href="css/post-44467.css" />
    <link rel="stylesheet" href="css/post-44561.css"/>
    <link rel="stylesheet" href="css/post-44506.css"/>
    <link rel="stylesheet" href="css/post-43907.css"/>
    <link rel="stylesheet" href="css/post-46229.css"/>
    <link rel="stylesheet" href="css/custom30f4.css?v=3"/>
    <link rel="stylesheet" href="css/post-44078.css" />
    <link rel="stylesheet" href="css/post-44619.css" />
    <link rel="stylesheet" href="css/post-44466.css" />
    <link rel="stylesheet" href="css/post-44650.css" />
