Home

Awesome

php-mf2-shim

An extension for php-mf2 which screen-scrapes some sites which don’t support microformats2 into canonical microformats data structures to make them easy to consume.

Supported sites:

Work-in-progress:

Installation

Install php-mf2-shim with Composer by adding "mf2/shim": "0.2.*" to the require object in your composer.json and running php composer.phar update.

You could install it by just downloading php-mf2, /Mf2/functions.php, /Mf2/Shim/*.php and including those, but please use Composer. Seriously, it’s amazing.

Usage

mf2-shim is PSR-0 autoloadable, so all you have to do to load it is:

Examples

<?php

require 'vendor/autoload.php';

use Mf2;

$output = Mf2\Shim\parseTwitter($html, $url);
$output = Mf2\Shim\parseFacebook($html, $url);

Changelog

v0.2.4

v0.2.3

v0.2.2

v0.2.1

v0.2.0 (BREAKING)

v0.1.0 (2013-06-07)