2017 © Pedro Peláez
 

library pagemunch

A PHP wrapper for the PageMunch link unfurling API

image

pagemunch/pagemunch

A PHP wrapper for the PageMunch link unfurling API

  • Saturday, December 31, 2016
  • by tommoor
  • Repository
  • 2 Watchers
  • 6 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PageMunch - Link Unfurling

Introduction

PageMunch is a simple API backed by an intelligent web crawler, that lets you extract data from any webpage on the internet in milliseconds. Whether you want to grab the best title, description and image for a page, prices, authorship, enable video embeds or more. We make it crazy easy to treat the web like a database., (*1)

Installation

You can install the PHP module using Composer, simply add it to your requirements, for example:, (*2)

{
    "require": {
        "PageMunch/PageMunch": ">=1.0.0"
    }
}

Or clone the repository directly from GitHub and use the class in the vendors directory of your Framework or elsewhere., (*3)

Usage

// if using Composer then you should use an autoloader, otherwise require the
// file however you might normally
require('src/PageMunch/PageMunch.php');
use PageMunch\PageMunch;

// create a new API object to use for requests - your API key from the PageMunch
// account dashboard should be passed in here. We recommend using an environment
// variable to make distributing code between environments easier and more secure
$api = new PageMunch(array('key' => getenv('PAGEMUNCH_API_KEY')));

$response = $api->extract('http://www.youtube.com/watch?v=9bZkp7q19f0');

// check if the API call succeeded and output the title from the response data
if ($response) {
    print_r($response->title);
} else {
    print_r($api->getError()->message);
}

More Details

For more information, libraries and documentation check out the PageMunch Documentation, (*4)

License

This module is Copyright PageMunch 2017., (*5)

The Versions

31/12 2016

dev-master

9999999-dev http://www.pagemunch.com

A PHP wrapper for the PageMunch link unfurling API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

url json link web crawler metadata schema.org parsing microformats unfurling