home
/
aioutajg
/
playpauseonline.com
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
[DIR] admin
N/A
[DIR] api
N/A
[DIR] assets
N/A
[DIR] blog-posts
N/A
[DIR] includes
N/A
[DIR] lib
N/A
[DIR] pages
N/A
[DIR] uploads
N/A
....install.php
951 bytes
Rename
Delete
.htaccess
877 bytes
Rename
Delete
ads.txt
58 bytes
Rename
Delete
composer.json
155 bytes
Rename
Delete
download.php
1.40 KB
Rename
Delete
favicon.ico
133.87 KB
Rename
Delete
index.php
67 bytes
Rename
Delete
rate_limit.log
140 bytes
Rename
Delete
robots.txt
232 bytes
Rename
Delete
sitemap.php
2.33 KB
Rename
Delete
thumbnails.php
2.33 KB
Rename
Delete
yt thumbnail downloader.zip
6.86 MB
Rename
Delete
<?php require_once 'includes/config.php'; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: ' . ($_SERVER['HTTP_ORIGIN'] ?? '*')); header('Access-Control-Allow-Credentials: true'); header('Cache-Control: no-cache, must-revalidate'); try { if ($_SERVER['REQUEST_METHOD'] !== 'POST') throw new Exception('Invalid request method'); if (empty($_POST['videoId'])) throw new Exception('Video ID required'); // Rate limiting with IP tracking $ip = $_SERVER['REMOTE_ADDR']; $logFile = 'rate_limit.log'; $requests = json_decode(file_get_contents($logFile), true) ?? []; $current = $requests[$ip] ?? 0; if ($current >= RATE_LIMIT) { throw new Exception('Rate limit exceeded. Please try again later.'); } $requests[$ip] = $current + 1; file_put_contents($logFile, json_encode($requests)); $videoId = sanitize_input($_POST['videoId']); if (!is_valid_video_id($videoId)) throw new Exception('Invalid YouTube Video ID'); // Get video details from API $apiUrl = "https://www.googleapis.com/youtube/v3/videos?part=snippet&id=$videoId&key=" . YT_API_KEY; $response = file_get_contents($apiUrl); $videoDetails = json_decode($response, true); if (empty($videoDetails['items'])) throw new Exception('Video not found'); // Get thumbnails from API response $thumbnails = []; $apiThumbnails = $videoDetails['items'][0]['snippet']['thumbnails']; foreach ($apiThumbnails as $quality => $thumb) { $thumbnails[] = [ 'url' => $thumb['url'], 'resolution' => "{$thumb['width']}x{$thumb['height']}", 'type' => ucfirst($quality) ]; } usort($thumbnails, function($a, $b) { return strpos($b['type'], 'Max') !== false ? 1 : -1; }); echo json_encode([ 'success' => true, 'thumbnails' => $thumbnails, 'videoDetails' => [ 'title' => $videoDetails['items'][0]['snippet']['title'], 'channel' => $videoDetails['items'][0]['snippet']['channelTitle'], 'published' => $videoDetails['items'][0]['snippet']['publishedAt'] ] ]); } catch (Exception $e) { http_response_code(400); echo json_encode(['success' => false, 'message' => $e->getMessage()]); } ?>
Save