svenanders / sarmetadata
Metadata extractor module for Zend Framework 2
Installs: 864
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Type:sarmetadata
Requires
- php: >=5
This package is not auto-updated.
Last update: 2024-11-23 16:39:25 UTC
README
#Metadata extractor module for ZF2
A ZF2 module to fetch metadata from any given URI
###More info
How to use
In your composer.json, add the following line
"svenanders/sarmetadata": "dev-master"
Add the following line to your application.config.php:
'modules' => array(
'SarMetadata',
),
In your code, include the class:
use SarMetadata\SarMetadata;
and then in your functions, use it like this:
$meta = new SarMetadata();
$url="http://www.imdb.com/title/tt1170358/?ref_=nv_sr_1";
$response=$meta->getMeta($url);
Provides:
->title
->author
->image
->keywords
->description
->twitter tweetcount
->facebook shares and likes
Tests:
execute phpunit vendor/svenanders/sarmetadata/tests/ from the root of your project to run the tests
#####License:
Sven Anders Robbestad (C) 2014