E' un parser. che funziona associato a worspress.
come librerie uso simplehtmldom e rsslib.
Codice PHP:
<?php
function PostRLSLog($anchors,$cat){
$title='';$text2='';$commenttext='';
$links = $anchors->href;
$anchors=(unset)null;
$html = file_get_html($links);
$title1 = $html->find('h3[class="entrytitle"]');
$title= $title1->plaintext;
$title1=(unset)null;
$text = $html->find('div[class="entrybody"]');
$comments = $html->find('div[class="commenttext"]');
if (trim($title) <> '' ){
$post['post_title']= trim($title);
$post['post_content'] = $text->innertext.'
'.$comments->innertext.'
thanks to [i]rlslog.net[/i]';
$post['post_status'] = 'publish';
$post['post_author'] = 1;
$post['post_category'] = $cat;
$post['tags_input']= str_replace(chr(32),',',$title.',multihost,direct download,music,albums,free,gratis,divx,english,megaupload,rapidshare');
$html->clear();
$title=(unset)null;
$comments=(unset)null;
$text2=(unset)null;;
return wp_insert_post($post);
}}
function Rls_grub_page($type){
include_once('simple_html_dom.php');
include_once('rsslib.php');
switch($type){
/*
switch di 2 variabili: $rsslinck e $cat, stringhe
*/
}
$post=array();
$rss = RSS_Links($rsslink, 10);
$xml = str_get_html($rss);
$rss=(unset)null;
$anchors = $xml->find('a');
$xml->clear();
foreach ($anchors as $anchors1){
if (!empty($anchors)){
PostRLSLog($anchors1,$cat);
}
}
echo 'finito';
}
?>