It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

Source: http://tvkabel.net

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.    <meta charset="UTF-8">
  5.    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.    <title>Telegram Image Generator Bot</title>
  7.    <script src="https://cdn.tailwindcss.com"></script>
  8.    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  9.    <style>
  10.        .telegram-btn {
  11.            background-color: #0088cc;
  12.            transition: all 0.3s;
  13.        }
  14.        .telegram-btn:hover {
  15.            background-color: #006699;
  16.        }
  17.        .preview-box {
  18.            border: 2px dashed #cbd5e0;
  19.            min-height: 300px;
  20.            background-color: #f8fafc;
  21.        }
  22.        .command-box {
  23.            background-color: #edf2f7;
  24.            border-left: 4px solid #4299e1;
  25.        }
  26.    </style>
  27. </head>
  28. <body class="bg-gray-50 min-h-screen">
  29.    <div class="container mx-auto px-4 py-8">
  30.        <div class="text-center mb-8">
  31.            <h1 class="text-4xl font-bold text-gray-800 mb-2">Telegram Image Generator Bot</h1>
  32.            <p class="text-gray-600">Create custom images directly from Telegram with our bot</p>
  33.        </div>
  34.  
  35.        <div class="flex flex-col lg:flex-row gap-8">
  36.            <!-- Bot Information Section -->
  37.            <div class="w-full lg:w-1/3 bg-white p-6 rounded-lg shadow-md">
  38.                <div class="flex items-center gap-4 mb-6">
  39.                    <div class="w-16 h-16 rounded-full bg-blue-100 flex items-center justify-center">
  40.                        <i class="fab fa-telegram text-3xl text-blue-500"></i>
  41.                    </div>
  42.                    <div>
  43.                        <h2 class="text-xl font-semibold text-gray-800">ImageGenBot</h2>
  44.                        <p class="text-gray-600">@ImageGeneratorBot</p>
  45.                    </div>
  46.                </div>
  47.  
  48.                <div class="mb-6">
  49.                    <h3 class="text-sm font-medium text-gray-700 mb-2">How to use:</h3>
  50.                    <ol class="list-decimal list-inside space-y-2 text-gray-600">
  51.                        <li>Start a chat with @ImageGeneratorBot</li>
  52.                        <li>Send <code>/start</code> to begin</li>
  53.                        <li>Use commands to generate images</li>
  54.                        <li>Download or share your creations</li>
  55.                    </ol>
  56.                </div>
  57.  
  58.                <a href="https://t.me/ImageGeneratorBot" target="_blank" class="w-full telegram-btn hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-md transition duration-200 flex items-center justify-center gap-2">
  59.                    <i class="fab fa-telegram"></i> Open in Telegram
  60.                </a>
  61.            </div>
  62.  
  63.            <!-- Commands and Preview Section -->
  64.            <div class="w-full lg:w-2/3">
  65.                <div class="bg-white p-6 rounded-lg shadow-md mb-6">
  66.                    <h2 class="text-xl font-semibold text-gray-800 mb-4">Available Commands</h2>
  67.                    
  68.                    <div class="space-y-4">
  69.                        <div class="p-4 rounded-md command-box">
  70.                            <div class="font-mono font-semibold text-blue-600 mb-1">/create [text]</div>
  71.                            <p class="text-gray-600">Generate an image with your text on a colored background</p>
  72.                        </div>
  73.                        
  74.                        <div class="p-4 rounded-md command-box">
  75.                            <div class="font-mono font-semibold text-blue-600 mb-1">/meme [top text]|[bottom text]</div>
  76.                            <p class="text-gray-600">Create a meme with top and bottom text</p>
  77.                        </div>
  78.                        
  79.                        <div class="p-4 rounded-md command-box">
  80.                            <div class="font-mono font-semibold text-blue-600 mb-1">/quote [your quote]</div>
  81.                            <p class="text-gray-600">Generate an inspirational quote image</p>
  82.                        </div>
  83.                        
  84.                        <div class="p-4 rounded-md command-box">
  85.                            <div class="font-mono font-semibold text-blue-600 mb-1">/color [hex color] [text]</div>
  86.                            <p class="text-gray-600">Create image with custom background color</p>
  87.                        </div>
  88.                    </div>
  89.                </div>
  90.  
  91.                <div class="bg-white p-6 rounded-lg shadow-md">
  92.                    <h2 class="text-xl font-semibold text-gray-800 mb-4">Example Output</h2>
  93.                    <div class="preview-box rounded-md flex items-center justify-center p-4">
  94.                        <img id="preview-image" src="https://via.placeholder.com/400x200?text=Your+Image+Will+Appear+Here" alt="Generated image preview" class="max-w-full h-auto rounded-md shadow-sm">
  95.                    </div>
  96.                </div>
  97.            </div>
  98.        </div>
  99.  
  100.        <!-- PHP Backend Explanation -->
  101.        <div class="mt-12 bg-white p-6 rounded-lg shadow-md">
  102.            <h2 class="text-2xl font-bold text-gray-800 mb-4">PHP Backend Implementation</h2>
  103.            
  104.            <div class="bg-gray-800 rounded-md p-4 mb-6 overflow-x-auto">
  105.                <pre class="text-gray-200 text-sm"><code>
  106. &lt;?php
  107. // Set your Telegram bot token
  108. $telegramBotToken = 'YOUR_BOT_TOKEN';
  109.  
  110. // Get the incoming update from Telegram
  111. $update = json_decode(file_get_contents('php://input'), true);
  112.  
  113. // Check if this is a valid message
  114. if (isset($update['message'])) {
  115.    $chatId = $update['message']['chat']['id'];
  116.    $messageText = $update['message']['text'];
  117.    
  118.    // Handle commands
  119.    if (strpos($messageText, '/start') === 0) {
  120.        sendMessage($chatId, "Welcome to Image Generator Bot! Use /create, /meme, /quote or /color commands to generate images.");
  121.    }
  122.    elseif (strpos($messageText, '/create') === 0) {
  123.        $text = trim(substr($messageText, 7));
  124.        if (empty($text)) {
  125.            sendMessage($chatId, "Please provide text after /create command");
  126.        } else {
  127.            $imageUrl = generateTextImage($text);
  128.            sendPhoto($chatId, $imageUrl);
  129.        }
  130.    }
  131.    elseif (strpos($messageText, '/meme') === 0) {
  132.        $parts = explode('|', trim(substr($messageText, 5)));
  133.        if (count($parts) < 2) {
  134.            sendMessage($chatId, "Please provide top and bottom text separated by |");
  135.        } else {
  136.            $imageUrl = generateMemeImage($parts[0], $parts[1]);
  137.            sendPhoto($chatId, $imageUrl);
  138.        }
  139.    }
  140.    // Add other command handlers here...
  141. }
  142.  
  143. // Function to generate text image
  144. function generateTextImage($text) {
  145.    // Create a blank image
  146.    $image = imagecreatetruecolor(800, 400);
  147.    
  148.    // Allocate colors
  149.    $bgColor = imagecolorallocate($image, rand(50, 200), rand(50, 200), rand(50, 200));
  150.    $textColor = imagecolorallocate($image, 255, 255, 255);
  151.    
  152.    // Fill background
  153.    imagefilledrectangle($image, 0, 0, 800, 400, $bgColor);
  154.    
  155.    // Add text
  156.    $font = 'arial.ttf'; // Make sure to have the font file
  157.    imagettftext($image, 36, 0, 50, 200, $textColor, $font, $text);
  158.    
  159.    // Save image to temporary file
  160.    $filename = tempnam(sys_get_temp_dir(), 'telegram_img') . '.png';
  161.    imagepng($image, $filename);
  162.    imagedestroy($image);
  163.    
  164.    return $filename;
  165. }
  166.  
  167. // Function to send message
  168. function sendMessage($chatId, $text) {
  169.    global $telegramBotToken;
  170.    $url = "https://api.telegram.org/bot$telegramBotToken/sendMessage";
  171.    $data = [
  172.        'chat_id' => $chatId,
  173.        'text' => $text
  174.    ];
  175.    file_get_contents($url . '?' . http_build_query($data));
  176. }
  177.  
  178. // Function to send photo
  179. function sendPhoto($chatId, $photoPath) {
  180.    global $telegramBotToken;
  181.    $url = "https://api.telegram.org/bot$telegramBotToken/sendPhoto";
  182.    
  183.    $ch = curl_init();
  184.    curl_setopt($ch, CURLOPT_URL, $url);
  185.    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  186.    curl_setopt($ch, CURLOPT_POST, 1);
  187.    
  188.    $photo = new CURLFile($photoPath);
  189.    curl_setopt($ch, CURLOPT_POSTFIELDS, [
  190.        'chat_id' => $chatId,
  191.        'photo' => $photo
  192.    ]);
  193.    
  194.    curl_exec($ch);
  195.    curl_close($ch);
  196.    
  197.    // Clean up
  198.    unlink($photoPath);
  199. }
  200. ?&gt;
  201.                </code></pre>
  202.            </div>
  203.  
  204.            <div class="space-y-4">
  205.                <div class="p-4 bg-blue-50 rounded-md">
  206.                    <h3 class="font-semibold text-blue-800 mb-2">How to Set Up:</h3>
  207.                    <ol class="list-decimal list-inside space-y-1 text-gray-700">
  208.                        <li>Create a new bot with @BotFather on Telegram</li>
  209.                        <li>Get your bot token</li>
  210.                        <li>Upload this PHP script to your web server</li>
  211.                        <li>Set the webhook URL in Telegram API: <code>https://api.telegram.org/botYOUR_TOKEN/setWebhook?url=https://yourdomain.com/yourscript.php</code></li>
  212.                        <li>Start chatting with your bot!</li>
  213.                    </ol>
  214.                </div>
  215.  
  216.                <div class="p-4 bg-yellow-50 rounded-md">
  217.                    <h3 class="font-semibold text-yellow-800 mb-2">Requirements:</h3>
  218.                    <ul class="list-disc list-inside space-y-1 text-gray-700">
  219.                        <li>PHP 7.0 or higher</li>
  220.                        <li>GD library installed for image generation</li>
  221.                        <li>SSL certificate (HTTPS) for webhook</li>
  222.                        <li>Write permissions in temporary directory</li>
  223.                    </ul>
  224.                </div>
  225.            </div>
  226.        </div>
  227.    </div>
  228.  
  229.    <script>
  230.        // This is just for demo purposes - in a real implementation, the PHP would handle Telegram updates
  231.        document.addEventListener('DOMContentLoaded', function() {
  232.            // Simulate different image generation commands
  233.            const commands = [
  234.                { cmd: '/create Hello World', img: 'https://via.placeholder.com/800x400/3b82f6/ffffff?text=Hello+World' },
  235.                { cmd: '/meme Top Text|Bottom Text', img: 'https://via.placeholder.com/800x400/ef4444/ffffff?text=Top+Text' },
  236.                { cmd: '/quote Be the change', img: 'https://via.placeholder.com/800x400/10b981/ffffff?text=Be+the+change' },
  237.                { cmd: '/color #8b5cf6 Purple', img: 'https://via.placeholder.com/800x400/8b5cf6/ffffff?text=Purple' }
  238.            ];
  239.            
  240.            // Rotate through example images
  241.            let currentIndex = 0;
  242.            const previewImage = document.getElementById('preview-image');
  243.            
  244.            setInterval(() => {
  245.                currentIndex = (currentIndex + 1) % commands.length;
  246.                previewImage.src = commands[currentIndex].img;
  247.                previewImage.alt = commands[currentIndex].cmd;
  248.            }, 3000);
  249.        });
  250.    </script>
  251. </body>
  252. </html>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda