Login   Register  
PHP Classes
elePHPant
Icontem

File: example2wc.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alexey G. Piyanin  >  HTML SAX Parser  >  example2wc.php  >  Download  
File: example2wc.php
Role: Example script
Content type: text/plain
Description: Example #2 with use class
Class: HTML SAX Parser
Parse HTML documents using regular expressions
Author: By
Last change:
Date: 9 years ago
Size: 515 bytes
 

Contents

Class file image Download
<?
/*
Author: Alexey G. Piyanin (e-mail: drdrzlo at mail dot ru)
Date:   Feb 15 2005
Title:  Page tree with use class
*/
include('SAXParser.php');
include(
'PageProcessor.php');

$procObj = new PageProcessor();
$URL 'http://yahoo.com';

$parser = new HTML_SAXParser();
$parser->init($procObj,'begin','endTag','character');?>
<html>
<body>
<center>Source page:<br><iframe src="<?=$URL?>" width="600" height="400" ></iframe><br><br>
Page tree:<br></center>
<?$parser->parse($URL);?>
</body></html>