Código PHP:
<?php
$database = "database";
$dbconnect = mysql_pconnect(localhost, dbuser, dbpassword);
mysql_select_db($database, $dbconnect);
$query = "select url, short, largo from `gal_item`ORDER BY id DESC limit 20";
$result = mysql_query($query, $dbconnect);
while ($line = mysql_fetch_assoc($result))
{
$return[] = $line;
}
$now = date("D, d M Y H:i:s T");
$output = "<?xml version=\"1.0\"?>
<rss version=\"2.0\">
<channel>
<title>Sexe Dur !</title>
<link>http://www.sexedur.info/rss.php</link>
<description>Videos porno Gratis Todos Los Dias.</description>
<language>es</language>
<pubDate>$now</pubDate>
<lastBuildDate>$now</lastBuildDate>
<docs>http://www.sexedur.info</docs>
<managingEditor>[email protected]</managingEditor>
<webMaster>[email protected]</webMaster>
";
foreach ($return as $line)
{
$output .= "<item><title>".htmlentities($line['short'])."</title>
<link>".htmlentities($line['url'])."</link>
<description>".htmlentities(strip_tags($line['largo']))."</description>
</item>";
}
$output .= "</channel></rss>";
header("Content-Type: application/rss+xml");
echo $output;
?>
como hago eso!!