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

dev-master 2014-06-20 14:52 UTC

This package is not auto-updated.

Last update: 2024-04-27 13:39:08 UTC


README

#Metadata extractor module for ZF2

A ZF2 module to fetch metadata from any given URI

###More info

http://blog.robbestad.com

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

CC BY