Guest User

2013 youTube Video Infgio Flasb

a guest
Oct 12th, 2023
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. <?php
  2. if (isset($_GET['video_id'])) {
  3. $video_id = $_GET['video_id'];
  4.  
  5. // Common parameters
  6. $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";
  7.  
  8. // Format map for different resolutions
  9. $formatMap = "fmt_map=36%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0%2C6%2F0%2F9%2F0%2F115%2C22%2F0%2F18%2F0%2F115";
  10.  
  11.  
  12.  
  13. // URL map for different resolutions
  14. $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}";
  15.  
  16. // Additional parameters
  17. $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}";
  18.  
  19. // Video format list for different resolutions
  20. $formatList = "fmt_list=35%2F1920x1080%2F9%2F0%2F115%2C5%2F1280x720%2F9%2F0%2F115%2C6%2Fx480%2F9%2F0%2F115";
  21.  
  22.  
  23.  
  24. // Stream map for different resolutions
  25. $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}";
  26.  
  27. $formatList2 = "fmt_list=36%2F1280x720%2F9%2F0%2F115%2C5%2F1280x720%2F9%2F0%2F115%2C6%2F1280x720%2F9%2F0%2F115";
  28.  
  29. $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}";
  30.  
  31. // Combine all parts to create the final URL
  32. $url = "{$commonParams}&{$formatMap}&{$urlMap}&{$additionalParams}&{$formatList}&{$streamMap}&{$formatList2}&{$streamMap2}";
  33.  
  34. // Output the generated URL
  35. echo $url;
  36. } else {
  37. // Handle the case where 'video_id' is not provided in the query string.
  38. echo "Please provide a video_id in the query string.";
  39. }
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment