PHP code example of alb / oembed
1. Go to this page and download the library: Download alb/oembed 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/ */
alb / oembed example snippets
php
use Alb\OEmbed;
$response = OEmbed\Simple::request('http://vimeo.com/31423544', array(
'maxwidth' => 400,
'maxheight' => 300,
));
echo $response->getTitle();
echo $response->getHtml();
php
use Alb\OEmbed;
$discovery = new OEmbed\Discovery;
$provider = $discovery->discover('http://vimeo.com/31423544');
// or, using OEmbed\Simple:
$provider = OEmbed\Simple::getProvider('http://vimeo.com/31423544');