Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 826 Bytes

README.md

File metadata and controls

41 lines (28 loc) · 826 Bytes

Contender

CircleCI

Contender is a very simple, fast, and flexible HTMLParser. You can scrape using Xpath or Css Selector.

Installation

With Composer

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

use Contender\Contender;

$document = Contender::loadStr(<<<HTMLPAGE
<div>
    <h1 id="header">Example Page</h1>
    <p>This is Contender example html-document.</p>
</div>
HTMLPAGE);

$node = $document->getElementById('header');

echo $node->innerHTML;

// Example Page

Documents