403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/banners/public_html/bway/rec/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/banners/public_html/bway/rec/tickettrack.php
<?php
require_once __DIR__ . '/../pixel/config.php';

// No-cache headers
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Pragma: no-cache');

// Parameters with defaults
$fromlink     = $_GET['fromlink'] ?? '0';
$utm_source   = $_GET['utm_source'] ?? 'BWW2022';
$utm_medium   = $_GET['utm_medium'] ?? 'referral';
$utm_campaign = $_GET['utm_campaign'] ?? 'article';
$utm_content  = $_GET['utm_content'] ?? '';
$articlelink  = $_GET['articlelink'] ?? '';
$regid        = $_GET['regid'] ?? '0';

if ($fromlink === '') {
    $fromlink = '0';
}

// Determine typerme
if ($fromlink == 0) {
    $typerme = 'TicketsShow';
} else {
    $typerme = 'Tickets';
}

if (isset($_GET['newsletter']) || stripos($utm_source, 'newsletter') !== false) {
    $typerme = 'TicketsNews';
}

if (isset($_GET['logo']) || stripos($utm_source, 'logo') !== false) {
    $typerme = 'TicketsLogo';
}

if (isset($_GET['uktc']) || stripos($utm_source, 'uktc') !== false) {
    $typerme = 'UKTC';
}

if (isset($_GET['special']) || stripos($utm_source, 'special') !== false) {
    $typerme = 'Special';
}

if ($fromlink == 55) {
    $typerme = 'TicketCentral';
}

if ($fromlink == 56) {
    $typerme = 'TicketCentralBottom';
}

$userAgent    = $_SERVER['HTTP_USER_AGENT'] ?? '';
$cfIp         = getClientIp();
$cookieExpiry = time() + (10 * 365 * 24 * 60 * 60); // ~10 years ("never" expire)

// Filter bots and validate articlelink
if (
    stripos($userAgent, 'bot') === false
    && stripos($userAgent, 'spider') === false
    && substr($cfIp, 0, 3) !== '47.'
    && isset($_GET['articlelink'])
    && strpos($articlelink, ' ') === false
    && strpos($articlelink, ';') === false
) {
    if (!is_numeric($regid)) {
        $regid = 0;
    }

    $db = getWriteDB();

    if (isset($_GET['clickedshow']) && is_numeric($_GET['clickedshow'])) {
        $clickedshow = (string)$_GET['clickedshow'];

        $stmt = $db->prepare(
            "INSERT INTO regionalstoryclick
             (datetime, regionid, articlelink, ipaddress, browser, fromlink, typer, clickedshow)
             VALUES (NOW(), :regid, :articlelink, :ip, :browser, :fromlink, :typer, :clickedshow)"
        );
        $stmt->execute([
            ':regid'       => (int)$regid,
            ':articlelink' => $articlelink,
            ':ip'          => getClientIp(),
            ':browser'     => substr($userAgent, 0, 250),
            ':fromlink'    => (int)$fromlink,
            ':typer'       => $typerme,
            ':clickedshow' => (int)$clickedshow,
        ]);

        // ticketbuy cookie
        if (!isset($_COOKIE['ticketbuy'])) {
            setcookie('ticketbuy', $clickedshow, $cookieExpiry, '/', COOKIE_DOMAIN);
        } elseif (strpos($_COOKIE['ticketbuy'], $clickedshow) === false) {
            $newVal = $_COOKIE['ticketbuy'] . ',"' . $clickedshow . '"';
            setcookie('TICKETBUY', $newVal, $cookieExpiry, '/', COOKIE_DOMAIN);
        }

    } else {
        // No clickedshow — validate regid and fromlink are numeric
        if (is_numeric($regid) && is_numeric($fromlink)) {
            $stmt = $db->prepare(
                "INSERT INTO regionalstoryclick
                 (datetime, regionid, articlelink, ipaddress, browser, fromlink, typer)
                 VALUES (NOW(), :regid, :articlelink, :ip, :browser, :fromlink, :typer)"
            );
            $stmt->execute([
                ':regid'       => (int)$regid,
                ':articlelink' => $articlelink,
                ':ip'          => getClientIp(),
                ':browser'     => substr($userAgent, 0, 250),
                ':fromlink'    => (int)$fromlink,
                ':typer'       => $typerme,
            ]);
        } else {
            exit;
        }

        // ticketbuyregion cookie
        if (!isset($_COOKIE['ticketbuyregion'])) {
            setcookie('ticketbuyregion', (string)$regid, $cookieExpiry, '/', COOKIE_DOMAIN);
        } elseif (strpos($_COOKIE['ticketbuyregion'], (string)$regid) === false) {
            $newVal = $_COOKIE['ticketbuyregion'] . ',' . $regid;
            setcookie('ticketbuyregion', $newVal, $cookieExpiry, '/', COOKIE_DOMAIN);
        }
    }

    // Build redirect URL
    $linkme = $articlelink;

    // Prepend https:// if missing protocol
    if (strncasecmp($linkme, 'http', 4) !== 0) {
        $linkme = 'https://' . $linkme;
    }

    // Amazon affiliate tag
    if (stripos($linkme, 'amazon') !== false) {
        $linkme .= '&tag=broadwaywor01-20';
    }

    // Special overrides
    if (stripos($linkme, 'newyorktheatreguide') !== false) {
        $linkme = 'https://ticketmaster.evyy.net/c/2299526/264167/4272?u=https%3A%2F%2Fwww.ticketmaster.com%2Fbroadway';
    }
    if (stripos($linkme, 'londontheatre') !== false) {
        $linkme = 'https://ticketmaster-uk.tm7562.net/c/2299526/431525/7562?u=https://guides.ticketmaster.co.uk/west-end-theatre/';
    }

    // Block non-secure URLs
    if (strncasecmp($linkme, 'http://', 7) === 0) {
        exit;
    }

    // Validate and redirect
    if (filter_var($linkme, FILTER_VALIDATE_URL)) {
        header('Location: ' . $linkme);
        exit;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit