<?php
require_once __DIR__ . "/../Febe.php";
$febe = new Febe;
$febe->setCurrentSubFolderLanguageCookie();
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 class="no-js no-svg ie lt-ie9 lt-ie8 lt-ie7" lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="description" content="Sign up today">
    <title class="js-project-name"></title>
    <base href="<?= $febe->getHref(); ?>">
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name='robots' content='max-image-preview:large'/>
    <link rel='dns-prefetch' href='http://fonts.googleapis.com/'/>
    <link rel='dns-prefetch' href='http://pro.fontawesome.com/'/>
    <link rel='stylesheet' id='wp-block-library-css' href='css/style.min9b2d.css' type='text/css' media='all'/>
    <link rel='stylesheet' id='classic-theme-styles-css' href='css/classic-themes.min68b3.css' type='text/css' media='all'/>
    <link rel='stylesheet' id='main-css-css' href='css/main.348f5725a796.css' type='text/css' media='all'/>
    <link rel='stylesheet' id='theme-headings-font-css' href='https://fonts.googleapis.com/css?family=Poppins%3A200%2C300%2C400%2C500%2C600%2C700&amp;ver=6.1' type='text/css' media='all'/>
    <link rel='stylesheet' id='theme-body-font-css' href='https://fonts.googleapis.com/css?family=Poppins%3A200%2C300%2C400%2C500%2C600%2C700&amp;ver=6.1' type='text/css' media='all'/>
    <link rel='stylesheet' id='theme-awesome-font-css' href='css/all9b2d.css' type='text/css' media='all'/>
    <link rel='stylesheet' id='theme-awesome-font-css' href='css/custom.css' type='text/css' media='all'/>
    <link rel='stylesheet' id='theme-awesome-font-css' href='css/intgrtn.css' type='text/css' media='all'/>
    <script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script>
    <script type='text/javascript' src='js/script.js' id='main-js-js'></script>
    <script type='text/javascript' src='js/443.8b929397.js' id='main-js-js'></script>
    <script type='text/javascript' src='js/main.065dd1dba796.js' id='main-js-js'></script>



