javascript - how to youtube thumbnails link replace with site link -
i have problem youtube video , thumbnails block in our country , want run youtube api getting these data , problem thumbnails links show these link
i want show through site link server like
https://img.example.com/vi/t0jqdjbed40/default.jpg
i try replace url string replace function not work please tell me how run through site link site show playit , vube.pk , flix
as purely theoretical thing, can replace sections of string using str_replace function:
str_replace( "https://i.ytimg.com/vi/t0jqdjbed40/default.jpg", "://i.ytimg.com", "://img.example.com");
this keep http://
or https://
protocol in place.
for use case, again purely theoretically, want download resource yourself, , provide end user. data using file_get_contents example:
$data = file_get_contents('http://www.example.com/');
you culd potentially embed image data directly page - see question: can embed .png image html page?
you should check youtube's terms of service before attempting anything...
Comments
Post a Comment