<?php
 
 
$classpath=dirname(__FILE__).'/classes';
 
 
include_once $classpath.'/html/AbstractMMProcessor.class.php';
 
include_once $classpath.'/html/MMP.class.php';
 
 
include_once dirname(__FILE__).'/BasicProcessor.class.php';
 
 
//our test URL
 
$url='http://radar.oreilly.com/';
 
 
//fetch it
 
$html=load_html($url);
 
 
//get our own custom processor instance:
 
$processor=new BasicProcessor();
 
 
//get the actual parser:
 
$parser=new MMP($processor);
 
 
//do the job:
 
$parser->parse($html);
 
 
function load_html($url){
 
    $html=file_get_contents($url);
 
    return $html;
 
}
 
 
?>
 
 |