
<!DOCTYPE html>
<html>
<head>
  <title>NOTFLIX IPTV</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
  
  <script disable-devtool-auto="" src="https://cdn.jsdelivr.net/npm/disable-devtool@latest"></script>
    body {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
    }

    #iframe-container {
      width: 100%;
      height: 60vh;
      border: none;
    }

    #header {
      text-align: center;
      padding: 10px;
      background-color: #333;
      color: #fff;
      font-weight: bold;
      font-size: 24px;
    }

    #banner-ad {
      width: 100%;
      height: 100px;
      background-color: #f0f0f0;
      text-align: center;
      margin-bottom: 10px;
    }

    #chatbox {
      width: 100%;
      height: 40vh;
      background-color: #f0f0f0;
      padding: 10px;
      border-top: 1px solid #ccc;
    }

    #chat-messages {
      overflow-y: auto;
      max-height: 70%;
    }

    #chat-input {
      width: 80%;
      height: 30px;
      padding: 10px;
      border: none;
      border-radius: 5px;
    }

    #send-btn {
      width: 20%;
      height: 30px;
      background-color: #4CAF50;
      color: #fff;
      border: none;
      border-radius: 5px;
    }

  </style>
</head>
<body>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1649976574603208"
     crossorigin="anonymous"></script>
  <div id="header">NOTFLIX IPTV</div>
  <div id="iframe-container">
    <iframe src="https://iptv-libre.pages.dev" frameborder="0" width="100%" height="100%" allow="encrypted-media *;" allowFullScreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
  </div>
  <div id="chatbox">
      <div style="font-size: 10px; color: #666; padding: 5px; text-align: center;">
Disclaimer: This content is embedded from an external source using iframe technology. NOTFLIX IPTV does not own or control the content.
</div>
  <div id="chatbox">
    <h2>Live Chat</h2>
    <div id="chat-messages"></div>
    <input type="text" id="chat-input" placeholder="Type a message...">
    <button id="send-btn">Send</button>
  </div>
 

  <script>
    const chatInput = document.getElementById('chat-input');
    const chatMessages = document.getElementById('chat-messages');
    const sendBtn = document.getElementById('send-btn');

    function escapeHtml(unsafe) {
      return unsafe
        .replace(/&/g, "&amp;")
        .replace(/</g, "&lt;")
        .replace(/>/g, "&gt;")
        .replace(/"/g, "&quot;")
        .replace(/'/g, "&#039;");
    }

    loadChatLogs();
    setInterval(loadChatLogs, 2000);

    sendBtn.addEventListener('click', () => {
      const message = chatInput.value.trim();
      const bannedChars = /[<>()\/\[\]{}]/;

      if (!bannedChars.test(message) && message.length <= 50) {
        const sanitizedMessage = escapeHtml(message);
        saveMessage(sanitizedMessage);
        chatInput.value = '';
      } else {
        alert('Invalid characters or message too long!');
      }
    });

    function saveMessage(message) {
      fetch('save_message.php', {
        method: 'POST',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        body: `message=${message}`,
      })
      .then(() => loadChatLogs())
      .catch((error) => console.error('Error:', error));
    }

    function loadChatLogs() {
      fetch('chat.txt')
      .then((response) => response.text())
      .then((data) => {
        const messages = data.split('\n').map((line) => `<p>${line}</p>`);
        chatMessages.innerHTML = messages.join('');
        chatMessages.scrollTop = chatMessages.scrollHeight;
      })
      .catch((error) => console.error('Error:', error));
    }
  </script>
</body>
</html>