A ZF2 module to fetch metadata from any given URI, (*1)
More info
http://blog.robbestad.com, (*2)
How to use
In your composer.json, add the following line, (*3)
"svenanders/sarmetadata": "dev-master"
Add the following line to your application.config.php:, (*4)
'modules' => array(
'SarMetadata',
),
In your code, include the class:, (*5)
use SarMetadata\SarMetadata;
and then in your functions, use it like this:, (*6)
$meta = new SarMetadata();
$url="http://www.imdb.com/title/tt1170358/?ref_=nv_sr_1";
$response=$meta->getMeta($url);
Provides:, (*7)
->title
->author
->image
->keywords
->description
->twitter tweetcount
->facebook shares and likes
Tests:, (*8)
execute phpunit vendor/svenanders/sarmetadata/tests/ from the root of your project to run the tests, (*9)
License:
Sven Anders Robbestad (C) 2014, (*10)
, (*11)