Download the PHP package yoozi/miner without Composer
On this page you can find all versions of the php package yoozi/miner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package miner
Short Description PHP library to extract the metadata from a public web page and/or summarize it.
License MIT
Homepage http://golem.yoozi.cn/
Informations about the package miner
Miner
![Gitter](https://badges.gitter.im/Join Chat.svg)
This library is part of Project Golem, see yoozi/golem for more info.
Miner is a PHP library that extracting metadata and interesting text content (like author, summary, and etc.) from HTML pages. It acts like a simplified HTML metadata parser in Apache Tika.
WTF is Miner?
Ta-da! Consider the screenshot taken from LinkedIn below:
When you post a link to your connections on LinkedIn, it will automatically extract the title, summary, and even cover image for you. Miner can be typically used to achieve tasks like this.
Installation
The best and easy way to install the Golem package is with Composer.
-
Open your composer.json and add the following to the require array:
-
Run Composer to install or update the new package dependencies.
or
Usage
Parsers
- Meta: Summarize a webpage by parsing its HTML meta tags. In most cases it favors Open Graph (OG) markup, and will fall back to standard meta tags if necessary.
- Readability: Summarize a webpage using Arc90's Readability alogrithm. All credit goes to @feelinglucky's PHP Port.
- Hybrid: In combination with the above two parsers, it simply takes Readability as the primary parser, and Meta as its fallback.
Hybrid is enabled by default. You can change parsers to best fit your needs:
Example
We can parse a remote url and extract its metadata directly.
Data returned:
All versions of miner with dependencies
illuminate/support Version ~4.0
kriswallsmith/buzz Version ~0.10
jeremykendall/php-domain-parser Version ~1.3