tanateros/parser

Parsing site on interested components

dev-master / 0.1.x-dev 2016-01-15 09:06 UTC

This package is not auto-updated.

Last update: 2024-11-13 20:27:12 UTC


README

Installation

composer require tanateros/parser "dev-master"

Example

<?php
require './vendor/autoload.php';

$config = [
    'cacheDir' => __DIR__ . DIRECTORY_SEPARATOR . 'cache',
    'periodTime' => 0.01,
    'dataFormat' => 'txt',
];
$site = 'http://example.com';

// parse images
$images = new TanaterosProject\Parser\Image($config, $site);
echo $images->parse('img');

// parse e-mails
$emails = new TanaterosProject\Parser\Email($config, $site);
echo $emails->parse('mail');