codeigniter, php, mysql, xhtml, css, jquery, flex web-development blog
PHP Simple HTML DOM Parser, Codeigniter Integration
Hi all,
I came across “Simple HTML DOM Parser” recently that allows jQuery like DOM selection. This function is quite handy to do some kungfoo DOM manipulation on the fly!
I needed to use it on codeIgniter so modified the files and integrated it into a single codeIgniter library. The original files can be accessed from here its sourceforge project page. For the codeigniter version of the library click here.
-
$this->load->library(‘domparser’);
-
$html = $this->domparser->file_get_html(‘http://www.google.com/’);
-
$rank = $html->find(‘b.gb1′);
-
For further utility functions of the DOM parser visit this link.
Feel free to comment or contact me directly for any query.
take care,
thephpx
| Print article | This entry was posted by admin on October 25, 2009 at 4:05 pm, and is filed under codeigniter. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 10 months ago
Quite spiffy sir. Thanks.
about 6 months ago
Hey,
Thanks for the files… am about to test it now. Will post back if any problems
Do you have any idea what version of CI you modified the files for?
fingers crossed : )
about 1 month ago
Trying to run this on godaddy and it appears to be freezing up on the library load.
Any idea why?
about 1 week ago
Thanks a lot! Fortunately I found your website before I was going to do this by myself