1. Go to this page and download the library: Download ivopetkov/video-embed library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ivopetkov / video-embed example snippets
$videoEmbed = new IvoPetkov\VideoEmbed('https://www.youtube.com/watch?v=Pwe-pA6TaZk');
// IvoPetkov\VideoEmbed Object
// (
// [url] => https://www.youtube.com/watch?v=Pwe-pA6TaZk
// [html] => <iframe width="480" height="270" src="https://www.youtube.com/embed/Pwe-pA6TaZk?feature=oembed" frameborder="0" allowfullscreen></iframe>
// [width] => 480
// [height] => 270
// [duration] =>
// [title] => Where the Hell is Matt? 2012
// [description] =>
// [thumbnail] => Array
// (
// [url] => https://i.ytimg.com/vi/Pwe-pA6TaZk/hqdefault.jpg
// [width] => 480
// [height] => 360
// )
// [author] => Array
// (
// [name] => Matt Harding
// [url] => https://www.youtube.com/user/mattharding2718
// )
// [provider] => Array
// (
// [name] => YouTube
// [url] => https://www.youtube.com/
// )
// [rawResponse] => {"html": "\u003ciframe width=\"480\" height=\"270\" ...
// )
$videoEmbed->setSize(800, 600); // will set a new width and height in the video html code
public __construct ( [ string $url ] )
public void load ( string $url )
public void setSize ( string|int $width , string|int $height )
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.