Does someone here know a html parser library that will work with codeigniter?
Similar questions have been asked here and here
Hopefully that helps.
More possibilities include DOMDocument::loadHTML and PHP Simple HTML DOM Parser
I was able to figure out how to run Simple_html_dom php library on codeigniter
I copied the file Simple_html_dom.php to
/system/libraries
Then in my controller I call it using
require_once('Simple_html_dom.php');
To use it I initialized it using this line
$html = new Simple_html_dom();
Load a page or link using the line
$html->load_file('http://www.google.com');
and parse or find elements using this line
$html->find('table tr td')->plaintext;
works fine and fits right to what I needed to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With