عرض مشاركة واحدة
عضو نشيط جدا
تاريخ التسجيل: May 2007-
#6 (permalink)  

كود PHP:
<?php
header
('(anti-spam-content-type:) text/xml');  
include(
'includes/config.php');
echo 
'<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">

<channel>

<title>example</title>
<link>http://www.example.com/</link>
<description></description>
<atom:link href="http://www.example.com/feed/" rel="self" type="application/rss+xml" />

'
;

$result mysql_query("select id, title, description from files where status = '1' order by timesplayed asc limit 10");
while (
$row mysql_fetch_array($result))
{
    
$fileid $row['fileid'];
    
$title $row['title'];
    
$description $row['description'];
    echo 
"<item>
<title>$title</title>
<description>$description</description>
<link>http://www.example.com/file/$fileid/</link>
<guid isPermaLink=\"false\">http://www.example.com/file/$fileid/</guid>
</item>

"
;
}
echo 
'</channel>
    
</rss>'
;
mysql_close($connect);
?>
أعتقد أن لمشكلتك علاقة بالترميز .. ماهو ترميز قاعدة البيانات والصفحة لديك ؟







التعديل الأخير تم بواسطة : dev11 بتاريخ 31-03-2008 الساعة 02:54 PM.
dev11 غير متواجد حالياً   قديم 31-03-2008, 02:53 PM
رد مع اقتباس