0 Fetching from outside snoopy (URI of the site)
10 Transfer to UTF-8 (asyoulike) The encoding of the site
20 Parsing XML simplehtml #\<h2\>([^<]*)\</h2\>#iU
30 Transfer from UTF-8 (asyoulike) Internal encoding of your site
40 Reassign defaultlink (URI of the site)
50 Clipping into local moduledb 86400
<?php
require_once dirname(dirname(__FILE__)).'/D3pipesParseAbstract.class.php' ;
class D3pipesParseSimplehtml extends D3pipesParseAbstract {
function execute( $html_source , $max_entries = '' )
{
$items = array() ;
preg_match_all( $this->option , $html_source , $matches , PREG_SET_ORDER ) ;
foreach( $matches as $match ) {
$items[] = array(
'headline' => $match[1] ,
'pubtime' => time() ,
// 'link' => '' ,
'fingerprint' => md5( $match[1] ) ,
) ;
}
return $items ;
}
}
?>