0
I Use This!
Activity Not Available

Project Summary

This little PHP library provides a roughly OEmbed - http://oembed.com - compatible interface for javascript and PHP clients to consume. It can deal with OEmbed providers by acting as a proxy, and it has a plugin system where you can add your own embed-providers.

Embeds are useful when you don't want a whole page to load something (namely, a resource), you just want the content itself: being a youtube video, a flickr photo, a calendar entry, or anything else.

A YouTube plugin is boundled.

Demo:

http://aadaam.dev.ischmerosok.hu/oembed/Embed.php?url=www.youtube.com/watch?v=8SUtE_HF-88&format=xml

http://aadaam.dev.ischmerosok.hu/oembed/tests/ForumTest.html

Usage:

$manager = ProviderManager::getInstance();
$manager->provide($url,$format)Where format is a string and one of:

xml json array serialized object

Usage of object is recommended.

There's a template for objects to render HTML direcltly (with my own LazyTemplateEngine which is about 10-20 lines of code, and included :), you can use it like:

$manager = ProviderManager::getInstance();
$obj=$manager->provide("http://www.youtube.com/watch? v=EQqJSAOOmGI","object");
$html=$obj->renderClass();You can add more providers in the providers.xml file. A non-OEmbed provider gets his XML node as a SimpleXML element in constructor, and must implement the

boolean match(string url) and mixed provide(string url,string format) functions.

Oh! Requires PHP5 I guess, and uses json_encode() function...

Tags

ajax oembed php semanticweb widget

In a Nutshell, php-oembed...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

BSD 4-clause (University of California-Specific)
Permitted

Place Warranty

Commercial Use

Modify

Distribute

Forbidden

Hold Liable

Use Trademarks

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    you can subscribe to e-mail newsletters to receive update from the Open Hub blog
  • ...
    55% of companies leverage OSS for production infrastructure
  • ...
    anyone with an Open Hub account can update a project's tags

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis