Skip to content

Instantly share code, notes, and snippets.

@Barneybook
Forked from thephpx/simple_dom_parser_code
Created August 23, 2012 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Barneybook/3431582 to your computer and use it in GitHub Desktop.
Save Barneybook/3431582 to your computer and use it in GitHub Desktop.
sample code for simple dom parser in codeigniter
$this->load->library('simple_html_dom');
$raw = file_get_html('http://faisalbd.com');
foreach($raw->find('a') as $element){
echo $element->href . '<br>';
}
//http://simplehtmldom.sourceforge.net/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment