PHP Simple HTML DOM Parser Script

In this post I have explained some elements to scrap data from external websites.
Simple HTML DOM parser is a PHP 5+ class which is useful to manipulate HTML elements. This class can work with both valid HTML and HTML pages that do not pass W3C validation. You can find elements by ids, classes, tags and many more. You can also add, delete or alter DOM elements. The only one thing you should care about is memory leaks – but you can avoid memory leaks as explained later.
(more…)

Read More

Listing files using glob patterns in nodejs

In a previous post we saw how to monitor files changes in nodejs. This was required in a cron job to check which files were changed by the cron process. I also needed to search for files in a particular directory to check which files were newly created by the process. Although this is possible using the file-state-monitor package, I needed the ability to use glob patterns while searching.
(more…)

Read More