27/08
2017
a simple html parser
A very simple php parser of html documents which returns the amount of tags used in the document., (*1)
Currently there are two return data types: * array * xml, (*2)
An example of parsing a given source, (*3)
$parser = new Parser(); $parser->parse($source); //$html may be a string, an url or a html document $parser->getTagsAsArray(); //to get found tags $parser->getTagsAsXml(); //to get found tags as XML document
This source may be one of the following types:, (*4)
$source = '<div><strong>this is a string</strong></div>'; //string format $source = '../file.html'; //file $source = 'https://thepiratebay-proxylist.org/'; //link