Download the PHP package le0m/opengraph without Composer
On this page you can find all versions of the php package le0m/opengraph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download le0m/opengraph
More information about le0m/opengraph
Files in le0m/opengraph
Package opengraph
Short Description PHP library for consuming and publishing Open Graph resources.
License MIT
Homepage https://github.com/le0m/opengraph
Informations about the package opengraph
fusonic/opengraph
A simple library to read Open Graph data from the web and generate HTML code to publish your own Open Graph objects. A fallback mode enables you to read data from websites that do not implement the Open Graph protocol.
Using this library you can easily retrieve stuff like meta data, video information from YouTube or Vimeo or image information from Flickr without using site-specific APIs since they all implement the Open Graph protocol.
See ogp.me for information on the Open Graph protocol.
Requirements
- PHP 5.4 and up
- fusonic/linq
- guzzlehttp/guzzle
- symfony/css-selector
- symfony/dom-crawler
Installation
The most flexible installation method is using Composer: Simply create a composer.json file in the root of your project:
Install composer and run install command:
Once installed, include vendor/autoload.php in your script.
Usage
Retrieve Open Graph data from a URL
There are some more properties but these are the basic and most commonly used ones.
Publish own Open Graph data
HTML code is formatted just for displaying purposes. You may choose between HTML5/XHTML output using the property.
Running tests
You can run the test suite with the following command:
License
This library is licensed under the MIT license.
All versions of opengraph with dependencies
symfony/dom-crawler Version ^2.5
symfony/css-selector Version ^2.5
fusonic/linq Version ~1.0
guzzlehttp/guzzle Version ^6.0