<?php
function get_micro()  {
	list($usec,  $sec) =  explode(" ",  microtime());
return ((float)$usec + (float)$sec); }
$start = get_micro();

require "includes/config.class.php";
require "includes/main.class.php";
require "includes/link.class.php";

$q = stripslashes($q);
$q = eregi_replace("\"", " ", $q);
$q = eregi_replace("\'", " ", $q);
$q = trim($q);
$ddl = new ddl();
$le = new linker();
$ddl->open();
$ddl->get($q, $types);
$e = new config();

$dls[app] = mysql_num_rows(mysql_query("select * from downloads WHERE type='App'"));
$dls[game] = mysql_num_rows(mysql_query("select * from downloads WHERE type='Game'"));
$dls[mobile] = mysql_num_rows(mysql_query("select * from downloads WHERE type='Mobile'"));
$dls[music] = mysql_num_rows(mysql_query("select * from downloads WHERE type='Music'"));
$dls[movies] = mysql_num_rows(mysql_query("select * from downloads WHERE type='Movie'"));
$dls[other] = mysql_num_rows(mysql_query("select * from downloads WHERE type='Other'"));
?>
<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>Mechoddl.Com RSS Feed</title>
<link>http://www.mechoddl.com/</link>
<description>Download movies, games, applications, music and anything you ever want for Free!</description>
<language>en-us</language>
<copyright>Copyright: (C) Mechoddl , http://www.mechoddl.com</copyright>
<image>
<title>Mechoddl.Com RSS Feed</title>
<width>88</width>
<height>33</height>
<link>http://www.mechoddl.com/</link>
<url>http://imageurlhost.com/images/5y94dp0dm1ipvpq57kj.gif</url>
</image>
<? while(list($id, $type, $title, $url, $sname, $surl, $date, $views, $rate) = mysql_fetch_row($ddl->get)) {
?>
<?
$title    = str_replace(" ","-",$title);
$title    = str_replace("&","",$title);
$title    = str_replace(",","",$title);
$title    = str_replace("--","-",$title);
?>
<item>
        <title><? echo "$title"; ?></title>
        <link><? echo "http://www.mechoddl.com/download-$id-$title.html"; ?></link>
        <pubDate><? echo date("r"); ?></pubDate>
</item>  
<? } ?>  
</channel>
</rss>