Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_GET['video_id'])) {
- $video_id = $_GET['video_id'];
- // Common parameters
- $commonParams = "status=ok&length_seconds=1&keywords=a&vq=None&muted=0&avg_rating=5.0&thumbnail_url=http%3A%2F%2Fi.ytimg.com%2Fvi%2F{$video_id}%2Fhqdefault.jpg&allow_ratings=1&hl=en&ftoken=&allow_embed=1";
- // Format map for different resolutions
- $formatMap = "fmt_map=36%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0%2C6%2F0%2F9%2F0%2F115%2C22%2F0%2F18%2F0%2F115";
- // URL map for different resolutions
- $urlMap = "fmt_url_map=35%7Chttp%3A%2F%2Flocalhost%3A8080%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}%2C5%7Chttp%3A%2F%2Flocalhost%3A8080%2Fassets%2F{$video_id}.mp4%2C6%7Chttp%3A%2F%2Flocalhost%3A8080%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}";
- // Additional parameters
- $additionalParams = "token=amogus&plid=amogus&track_embed=0&author=Blender&title=Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film&video_id={$video_id}";
- // Video format list for different resolutions
- $formatList = "fmt_list=35%2F1920x1080%2F9%2F0%2F115%2C5%2F1280x720%2F9%2F0%2F115%2C6%2Fx480%2F9%2F0%2F115";
- // Stream map for different resolutions
- $streamMap = "fmt_stream_map=35%7Chttp%3A%2F%2Flocalhost%3A8080%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}%2C5%7Chttp%3A%2F%2F0.0.0.0%3A0000%2Fassets%2F{$video_id}.mp4%2C6%7Chttp%3A%2F%2F0.0.0.0%3A0000%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}";
- $formatList2 = "fmt_list=36%2F1280x720%2F9%2F0%2F115%2C5%2F1280x720%2F9%2F0%2F115%2C6%2F1280x720%2F9%2F0%2F115";
- $streamMap2 = "fmt_stream_map=36%7Chttp%3A%2F%2Flocalhost%3A8080%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}%2C5%7Chttp%3A%2F%2F0.0.0.0%3A0000%2Fassets%2F{$video_id}.mp4%2C6%7Chttp%3A%2F%2F0.0.0.0%3A0000%2Fapiv1%2Ffetch_videos.php%3Fvideo_id%3D{$video_id}";
- // Combine all parts to create the final URL
- $url = "{$commonParams}&{$formatMap}&{$urlMap}&{$additionalParams}&{$formatList}&{$streamMap}&{$formatList2}&{$streamMap2}";
- // Output the generated URL
- echo $url;
- } else {
- // Handle the case where 'video_id' is not provided in the query string.
- echo "Please provide a video_id in the query string.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment