uzura8/opengraph

Open Graph Protocol helper for PHP (forked from scottmac/opengraph)

Maintainers

Details

github.com/uzura8/opengraph

Source

Installs: 2 324

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 152

1.0 2015-08-18 22:48 UTC

This package is not auto-updated.

Last update: 2024-05-11 15:56:37 UTC


README

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";
}