
<!DOCTYPE html>
<html>
<head>
  <title>NOTFLIX IPTV</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script disable-devtool-auto="" src="https://cdn.jsdelivr.net/npm/disable-devtool@latest"></script>
  <style>
    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;
      <input type="text" id="chat-input" placeholder="Type a message..." pattern="[a-zA-Z0-9\s]*" maxlength="20">
    }
    #send-btn {
      width: 20%;
      height: 30px;
      background-color: #4CAF50;
      color: #fff;
      border: none;
      border-radius: 5px;
    }
    #footer {
text-align: center;
padding: 10px;
background-color: #333;
color: #fff;
position: fixed;
bottom: 0;
width: 100%;
}
  </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>
    <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>
    <script>
      const chatInput = document.getElementById('chat-input');
      const chatMessages = document.getElementById('chat-messages');
      const sendBtn = document.getElementById('send-btn');

      loadChatLogs();
      setInterval(loadChatLogs, 5000); // update every 1 second

      sendBtn.addEventListener('click', () => {
        const message = chatInput.value.trim();
  const regex = /^[a-zA-Z0-9\s]+$/;
  
  if (message && regex.test(message) && message.length <= 100) {
    saveMessage(message);
    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>
  </div>
</body>
</html>