How to Extract all Images from a Webpage with Ruby
Here is a little ruby snippet that will download all pictures from a webpage.
Rather than using XPath, we are going to first reduce the source code to capture everything inside of quotes. Some websites use JSON w/in a script tag to lazy load images an...
Written by Sean Behan on 08/01/2018
XPath with HTML in PHP One Liner
Here is a one liner for using XPATH with HTML in PHP
$doc = new DOMXPath(@DOMDocument::loadHTML(file_get_contents("https://www.reddit.com/r/PHP/")));
Now you can use XPATH to query the html..
foreach($doc->query("//a") as $el){
echo $el->no...
Written by Sean Behan on 11/14/2017
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](https://packagist.org/packages/htmlxpath/htmlxpath) and the source code is on [github](https://github.com/seanbehan/htmlxpath).
To install the package u...
Written by Sean Behan on 03/28/2017