Wednesday, September 26, 2012

PHP Simple HTML DOM Parser

PHP simple HTML DOM Paser can be downloaded from:


PHP Simple HTML DOM Parser:
  • A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way!
  • Require PHP 5+.
  • Supports invalid HTML.
  • Find tags on an HTML page with selectors just like jQuery.
  • Extract contents from HTML in a single line.
My example  to extract a swf link for a flash website as following test.php
 // Create DOM from URL or file
$html = file_get_html('');
// Find all images
foreach($html->find('EMBED') as $element)
      echo $element->src . '<br>';


1 comment:

  1. Thanks for your grateful informations, this blogs will be really help for PHP tutorial.