Download the PHP package sergiocarlosmorales/opengraph without Composer
On this page you can find all versions of the php package sergiocarlosmorales/opengraph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package opengraph
Clone of fusonic/opengraph to handle special dependency case for its v1
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 7.4+
- fusonic/linq
- symfony/css-selector
- symfony/dom-crawler
- psr/http-client, psr/http-factory and compatible implementation such as guzzle/guzzle
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 by running phpunit
from the command line.
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