Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get youtube thumbnail php

function youtubeThumbnail ($youtubeID, $size = 'default'): ?string
{
  $final_size = match ($size) {
    'low' => 'sddefault',
    'medium' => 'mqdefault',
    'high' => 'hqdefault',
    default => 'maxresdefult'
    };
  return "https://img.youtube.com/vi/". $youtubeID. "/". $final_size .".jpg";
}
Comment

PREVIOUS NEXT
Code Example
Php :: Wordpress SVG Manually - function.php 
Php :: add 30 minutes to time in php 
Php :: laravel check php version 
Php :: carbon add days 
Php :: how to get php version in xampp 
Php :: how to check number only in php 
Php :: php merge 2 arrays 
Php :: php check name 
Php :: missing view cakephp 
Php :: wordpress disable posts 
Php :: laravel session put method 
Php :: use if in laravel blade 
Php :: php get intersection of two arrays 
Php :: I need help 
Php :: Laravel Drop All Tables & Migrate 
Php :: php client enable short tags 
Php :: laravel scaffolding 
Php :: how to delete a file in laravel 
Php :: php redirect after specific seconds 
Php :: switch php 
Php :: laravel subdays 
Php :: date 3 months ago for a particular date php 
Php :: laravel on delete set null 
Php :: php set array 
Php :: how to get all roles in wordpress 
Php :: php from 
Php :: php get random value from array 
Php :: guzzlehttp php basic auth 
Php :: dir name php 
Php :: laravel tinker add user 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =