<?php

require_once ("/server/wwwroot/lib/caching.inc.php");
require_once ("/server/wwwroot/lib/time.inc.php");
require_once ("/server/wwwroot/lib/sql.inc.php");

$PubDate		= date("d.m.Y H:i:s");
$PubDate		.= " +200";
$CurrentDay		= GetSQlDateEn();
$QuerySources	= array();

error_reporting(0);

header('Content-type: text/xml; charset=UTF-8');
header("Expires: " . gmdate("D, d M Y H:i:s",time()+(2*60*60*60)) . " +0200");

echo <<<END
	<xml version="1.0" encoding="utf-8">
	<rss version="2.0">
      <channel>
        <title>zoozle.net Torrent + Emule RSS Feed</title>
        <link>http://www.zoozle.biz/</link>
        <description>zoozle nouvelles des Bittorrent + eMule Downloads</description>
        <language>fr</language>
        <category>tout les categorie</category>
        <webMaster>bigfish82@gmail.com</webMaster>
        <image>
          <title>Bit Torrent moteur de recherche eMule BitTorrent Binary Usenet Cracks zoozle p2p </title>
          <url>http://85.214.77.110/images/zoozle-fr.gif</url>
          <link>http://www.zoozle.biz/</link>
        </image>
END;


$KeywordDate		= date("j.n.Y");
$KeyWordStoreDir	= date("n.Y");

$StorePath	= "/server/querys/keywords/$KeyWordStoreDir";

# erstelle absoluten pfad zur keyword store datei
$StorePathFileFR .= $StorePath . "/$KeywordDate.fr.txt";
$CountDe = 0;
$CountEn = 0;


# en keywords einlesen
$fh = fopen("$StorePathFileFR","r");
flock($fh, LOCK_EX);

//start buffered download
while(!feof($fh)){
	
	$Byte = fread($fh, 1);
	$res .= $Byte;
	
	if ( $Byte == "\n" ){
		$desc	= utf8_encode(htmlspecialchars($res));
		# $url	= urldecode($Url);;

		if ( strlen($desc) >= 3 && $CountEn < 300 ){
			echo <<<END
				<item>
					<title>$desc - download</title>
					<link>http://www.zoozle.biz/telecharger-bittorrent-emule/$desc,torrent,fr,0.html</link>
					<description>telecharger $desc torrent - francais</description>
					<pubDate>$PubDate</pubDate>
					<guid isPermaLink="true">http://www.zoozle.biz/telecharger-bittorrent-emule/$desc,torrent,fr,0.html</guid>
				</item>
				<item>
					<title>$desc - download</title>
					<link>http://www.zoozle.biz/telecharger-bittorrent-emule/$desc,emule,fr,0.html</link>
					<description>telecharger $desc torrent - francais</description>
					<pubDate>$PubDate</pubDate>
					<guid isPermaLink="true">http://www.zoozle.biz/telecharger-bittorrent-emule/$desc,emule,fr,0.html</guid>
				</item>
END;
			}; # if ( strlen($desc) >= 3 ){
	
		$res = "";
		$CountEn++;

	}; # if ( $Byte == "\n" ){
	
}; # while(!feof($fp)){

fclose($fh);


echo "</channel>";
echo "</rss>";
echo "</xml>";

exit(0);