Skip to content

Instantly share code, notes, and snippets.

@romac
Created June 19, 2010 13:54
Show Gist options
  • Save romac/444918 to your computer and use it in GitHub Desktop.
Save romac/444918 to your computer and use it in GitHub Desktop.
RRoEmbed Usage Example
<?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