2017 © Pedro Peláez
 

library oembed

oEmbed consumer library

image

alb/oembed

oEmbed consumer library

  • Monday, November 7, 2016
  • by arnaud-lb
  • Repository
  • 3 Watchers
  • 15 Stars
  • 23,650 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

PHP oEmbed consumer library

Build Status, (*1)

Simple consumer library for oEmbed with discovery support., (*2)

Usage

In this example the library automatically discovers the oEmbed enpoint for the http://vimeo.com/31423544 resource, and asks for informations about the resource., (*3)

``` php <?php, (*4)

use Alb\OEmbed;, (*5)

$response = OEmbed\Simple::request('http://vimeo.com/31423544', array( 'maxwidth' => 400, 'maxheight' => 300, ));, (*6)

echo $response->getTitle(); echo $response->getHtml();, (*7)


### Advanced usage: ``` php <?php use Alb\OEmbed; // instanciate a Provider from a known endpoint $provider = new OEmbed\Provider('http://vimeo.com/api/oembed.json', 'json'); // request information about a resource $response = $provider->request('http://vimeo.com/31423544');

The library is also capable of discovering the oEmbed enpoint from a resource URL (if the site supports it):, (*8)

``` php <?php, (*9)

use Alb\OEmbed;, (*10)

$discovery = new OEmbed\Discovery; $provider = $discovery->discover('http://vimeo.com/31423544');, (*11)

// or, using OEmbed\Simple:, (*12)

$provider = OEmbed\Simple::getProvider('http://vimeo.com/31423544'); ```, (*13)

The Versions

07/11 2016

dev-master

9999999-dev https://github.com/arnaud-lb/alb-oembed

oEmbed consumer library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Arnaud Le Blanc

oembed

27/03 2013

1.1.0

1.1.0.0 https://github.com/arnaud-lb/alb-oembed

oEmbed consumer library

  Sources   Download

MIT

by Arnaud Le Blanc

oembed

14/01 2012

1.0.0

1.0.0.0 https://github.com/arnaud-lb/alb-oembed

oEmbed consumer library

  Sources   Download

MIT

by Arnaud Le Blanc

oembed