https://github.com/arnaud-lb/alb-oembed
Simple PHP oEmbed consumer library with discovery support
https://github.com/arnaud-lb/alb-oembed
Last synced: about 2 months ago
JSON representation
Simple PHP oEmbed consumer library with discovery support
- Host: GitHub
- URL: https://github.com/arnaud-lb/alb-oembed
- Owner: arnaud-lb
- License: mit
- Created: 2011-11-03T09:50:18.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2016-11-07T13:16:00.000Z (over 8 years ago)
- Last Synced: 2024-06-18T21:40:34.491Z (12 months ago)
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 16
- Watchers: 6
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP oEmbed consumer library
[](http://travis-ci.org/arnaud-lb/alb-oembed)
Simple consumer library for [oEmbed](http://oembed.com/) with discovery support.
## 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.
``` php
400,
'maxheight' => 300,
));echo $response->getTitle();
echo $response->getHtml();
```### Advanced usage:
``` php
request('http://vimeo.com/31423544');
```The library is also capable of discovering the oEmbed enpoint from a resource URL (if the site supports it):
``` php
discover('http://vimeo.com/31423544');// or, using OEmbed\Simple:
$provider = OEmbed\Simple::getProvider('http://vimeo.com/31423544');
```