home
/
aioutajg
/
freecrazygames.xyz
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
.htaccess
2.48 KB
Rename
Delete
.htaccess.zip
16.40 KB
Rename
Delete
blog_post.php
3.34 KB
Rename
Delete
database_connection.php
672 bytes
Rename
Delete
error_log
9.66 KB
Rename
Delete
footer.php
299 bytes
Rename
Delete
header.php
1.15 KB
Rename
Delete
index.php
2.31 KB
Rename
Delete
install.php
801 bytes
Rename
Delete
login.php
4.26 KB
Rename
Delete
logout.php
919 bytes
Rename
Delete
register.php
5.44 KB
Rename
Delete
script.js
1.76 KB
Rename
Delete
style.css
7.31 KB
Rename
Delete
<?php // index.php require_once 'database_connection.php'; $pageTitle = 'YouTube Thumbnail Downloader'; // Thumbnail Download Logic $error = $videoId = ''; $thumbnails = []; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $url = trim($_POST['url'] ?? ''); // Improved YouTube ID extraction preg_match('/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/', $url, $matches); $videoId = $matches[1] ?? ''; if ($videoId) { $thumbnails = [ 'maxresdefault' => "https://img.youtube.com/vi/$videoId/maxresdefault.jpg", 'sddefault' => "https://img.youtube.com/vi/$videoId/sddefault.jpg", 'hqdefault' => "https://img.youtube.com/vi/$videoId/hqdefault.jpg", ]; } else { $error = 'Invalid YouTube URL'; } } include 'header.php'; ?> <div class="max-w-4xl mx-auto bg-white p-6 rounded-lg shadow-md"> <h1 class="text-3xl font-bold mb-6">YouTube Thumbnail Downloader</h1> <form method="POST" class="mb-8"> <input type="url" name="url" placeholder="Enter YouTube URL" class="w-full p-3 border rounded-lg mb-2" required> <button type="submit" class="bg-red-600 text-white px-6 py-2 rounded-lg hover:bg-red-700"> Get Thumbnails </button> </form> <?php if($error): ?> <div class="bg-red-100 text-red-700 p-3 rounded-lg mb-4"><?= $error ?></div> <?php endif; ?> <?php if($thumbnails): ?> <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> <?php foreach ($thumbnails as $type => $url): ?> <div class="border rounded-lg overflow-hidden"> <img src="<?= $url ?>" alt="<?= $type ?> thumbnail" class="w-full h-48 object-cover"> <div class="p-3 bg-gray-50"> <a href="<?= $url ?>" download="thumbnail_<?= $videoId ?>_<?= $type ?>.jpg" class="bg-blue-600 text-white px-4 py-2 rounded-lg block text-center hover:bg-blue-700"> Download </a> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> </div> <?php include 'footer.php'; ?>
Save