f1ames / opengraph
Open Graph Protocol helper for PHP - A small library for making accessing of Open Graph Protocol data easier
Installs: 9 176
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 154
pkg:composer/f1ames/opengraph
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-12-20 21:47:04 UTC
README
A composer friendly fork of https://github.com/scottmac/opengraph, available on packagist https://packagist.org/packages/f1ames/opengraph
Open Graph Protocol helper for PHP
A small library for making accessing of Open Graph Protocol data easier.
Note
Keys with a dash (-) in the name are converted to _ for easy access as a property in PHP
Required Extensions
- DOM for parsing
Usage
require_once('OpenGraph.php');
$graph = OpenGraph::fetch('http://www.rottentomatoes.com/m/10011268-oceans/');
var_dump($graph->keys());
var_dump($graph->schema);
foreach ($graph as $key => $value) {
echo "$key => $value";
}