Created
June 19, 2010 13:54
-
-
Save romac/444918 to your computer and use it in GitHub Desktop.
RRoEmbed Usage Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include the autoloader. | |
require_once( dirname( __FILE__ ) . '/Classes/RRoEmbed/Autoloader.class.php' ); | |
// Register the autoloader. | |
RRoEmbed_Autoloader::getInstance()->register(); | |
// Create a new consumer. | |
$c = new RRoEmbed_Consumer(); | |
// Give it the URL to get the oEmbed resource of and the Provider. | |
// The provider can currently be one of: 'Flickr', 'OohEmbed', 'Vimeo' and 'Youtube' | |
$o = $c->consume( | |
'http://www.flickr.com/photos/romac17/4101838222/', | |
new RRoEmbed_Provider_Flickr() | |
); | |
print $o; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment