English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

I Just Published My First PHP Package HTMLXPATH


I just wrote and published my first PHP package on Packagist.com. It's available on packagist.org and the source code is on github.

To install the package use composer

composer require htmlxpath/htmlxpath

Then you can use it to consume webpages and extract content with xpath.

require 'vendor/autoload.php';

foreach(HTMLXPath\xpath('http://www.seanbehan.com', '//a/text()') as $node)
    echo $node->nodeValue;

It's just a wrapper that creates and sets up a few objects exposing them as generators.

I am quite impressed with the PHP community these days. The number of packages and the way things "just work" is top notch.

Tagged w/ #php #xpath #xml #packaging #development