mapkyca/php-ogp

Simple PHP Open Graph Protocol parser library

Maintainers

👁 mapkyca

Package info

github.com/mapkyca/php-ogp

pkg:composer/mapkyca/php-ogp

Statistics

Installs: 21 903

Dependents: 2

Suggesters: 0

Stars: 26

Open Issues: 0

1.1.0 2021-03-06 12:07 UTC

Requires

  • php: >=5.6.0

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

GPL-2.0-only 2e72fe0959c0a6dd57f13e4c8306fd3614b90734

opengraph

This package is auto-updated.

Last update: 2026-06-07 00:33:07 UTC


README

This is a very very simple PHP open graph parser.

Pass it the contents of a web page, and it'll spit back an associated array of open graph tags and the value.

Usage

Include the library and call Parser's ::parse() function.

Example:

	require_once('ogp/Parser.php');

	$content = file_get_contents("https://www.youtube.com/watch?v=EIGGsZZWzZA");
	
	print_r(\ogp\Parser::parse($content));

Installation

To install this in your project:

composer require mapkyca/php-ogp

Author

See