Skip to content
forked from oscarotero/Embed

PHP library to embed any web service or page (oembed, opengraph, etc)

Notifications You must be signed in to change notification settings

buggedcom/Embed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Embed

PHP library to get info and embed any web page (using oembed, opengraph, twitter-cards, etc). It's compatible with any web service (youtube, vimeo, flickr, instagram, etc). Has adapters to some webpages like (archive.org, github, deviantart, etc).

Requirements:

  • PHP 5.3+
  • Curl library installed
  • A PSR-0 compatible autoloader class

Usage:

//Load any url:

$Url = new Embed\Url('https://www.youtube.com/watch?v=PP1xn5wHtxE');
$Info = Embed\Embed::create($Url);

//Get content info

$Info->title;
$Info->description;
$Info->url;
$Info->type;

$Info->code;
$Info->image;
$Info->width;
$Info->height;
$Info->aspectRatio;

$Info->authorName;
$Info->authorUrl;

$Info->providerName;
$Info->providerUrl;
$Info->providerIcon;

Online demo

http://oscarotero.com/embed/test.php

About

PHP library to embed any web service or page (oembed, opengraph, etc)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%