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
1 response so far ↓
1 Kyle Farris // Oct 26, 2009 at 2:48 am
Quite spiffy sir. Thanks.
Leave a Comment