$sChannel) { //Extract file $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://rss.binsearch.net/rss.php?max=300&g='.$sChannel); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_ENCODING , "gzip"); $sRssIn = curl_exec($ch); curl_close($ch); //Rss Feed Input $sRssIn = str_replace("\n", '', $sRssIn); //Rss Feed Output $sRssOut = ''; //Slice Rss feed into items preg_match_all("/\(.+)\<\/item\>/U", $sRssIn, $asItems); //print_r($asItems);die(); foreach($asItems[1] as $iItemKey=>$sItem) { //Slice item into tags preg_match_all("/\<(?P\w+)\>(?P.+)\<\/(?P\w+)\>/U", $sItem, $asTags); //print_r($asTags);die(); /* [0] => Array ( [0] => dc96773fb88f2f75d581194a4320fedc[76/79] - "15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f.0" yEnc (1/1) [1] => <table border width="75%" style="border: solid 1px"><tr><td width="25%">Group:<td>alt.binaries.hdtv.x264<tr><td>Subject:<td>dc96773fb88f2f75d581194a4320fedc[76/79] - "15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f.0" yEnc (1/1)<tr><td>Poster:<td>Yenc@power-post.org (Yenc-PP-A&amp;A)<tr><td>Details:<td><span class="d"><br><a href="http://www.binsearch.info/?b=15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f&amp;g=alt.binaries.hdtv.x264&amp;p=Yenc%40power-post.org+%28Yenc-PP-A%26A%29&amp;max=250">collection</a> size: 2.35&nbsp;MB, parts available: 7 / 7<br>- 2 par2 files<br>- 1 split file<br>- 1 other file<br></span></table> [2] => Thu, 03 Jan 2013 15:31:53 GMT [3] => http://www.binsearch.info/?action=nzb&97515747=1 ) [tag] => Array ( [0] => title [1] => description [2] => pubDate [3] => link ) [text] => Array ( [0] => dc96773fb88f2f75d581194a4320fedc[76/79] - "15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f.0" yEnc (1/1) [1] => <table border width="75%" style="border: solid 1px"><tr><td width="25%">Group:<td>alt.binaries.hdtv.x264<tr><td>Subject:<td>dc96773fb88f2f75d581194a4320fedc[76/79] - "15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f.0" yEnc (1/1)<tr><td>Poster:<td>Yenc@power-post.org (Yenc-PP-A&amp;A)<tr><td>Details:<td><span class="d"><br><a href="http://www.binsearch.info/?b=15321568f277a26d326baddfb33d62621fe93693187c474f8cac0fb13a0d5b8f&amp;g=alt.binaries.hdtv.x264&amp;p=Yenc%40power-post.org+%28Yenc-PP-A%26A%29&amp;max=250">collection</a> size: 2.35&nbsp;MB, parts available: 7 / 7<br>- 2 par2 files<br>- 1 split file<br>- 1 other file<br></span></table> [2] => Thu, 03 Jan 2013 15:31:53 GMT [3] => http://www.binsearch.info/?action=nzb&97515747=1 */ //Extract item's tag names foreach($asTags['tag'] as $iTagKey=>$sTageName) { $asTagIndex[$sTageName] = $iTagKey; } $sTitle = $asTags['text'][$asTagIndex['title']]; $sDesc = $asTags['text'][$asTagIndex['description']]; //Validator $bValid = true; //Check Poster //preg_match('/Poster\:\<\;td\>\;(?P
\S*)\ \((?P\S*)\)/i', $sTitle, $as); foreach($asBlTitle as $sBlWord) { preg_match('/'.preg_quote($sBlWord).'/i', $sTitle, $asFoundBlWord); if(count($asFoundBlWord) != 0) $bValid = false; } foreach($asBlDesc as $sBlWord) { preg_match('/'.preg_quote($sBlWord).'/i', $sDesc, $asFoundBlWord); if(count($asFoundBlWord) != 0) $bValid = false; } //Check movie quality preg_match('/1080p/i', $sTitle, $asQuality); if(count($asQuality) == 0) $bValid = false; //Jul - Remove German movies //preg_match('/german/i', $sTitle, $asLang); //if(count($asLang) != 0) $bValid = false; //Check Series preg_match('/s([0-9]{1,2})e([0-9]{2})/i', $sTitle, $asSeries); if(count($asSeries) != 0) $bValid = false; if($bValid) $asValidItems[] = $asItems[0][$iItemKey]; } } //rebuild RSS feed date_default_timezone_set('Europe/Paris'); echo ''. ''. ''.implode(', ', $asChannels).''. 'http://www.binsearch.info/'. 'Latest newsgroup posts as indexed by BinSearch.info'. 'This RSS collection is copyright (c) BinSearch team. Commercial use prohibited. This collection is generated by an automated process based on the posts found in global Usenet newsgroups. The posters retain copyright over their individual posts.'. ''.date('r').''. implode("\n\t\t", $asValidItems). ''. ''; ?>