Jump to content

NOOB - RSS problem


plodos

Recommended Posts

<?

include "dbconfig.php";

 

header("Content-type: text/xml\n\n");

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>

<rss version=\"2.0\">

<channel>

<title>World</title>

<description>WAS</description>

<copyright>Copyright 2008, xxx.com</copyright>

<link>http://www.xxx.com/rss.php</link>

<language>ENG</language>

";

?>

<?

$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");

while ( $data = mysql_fetch_array($a) )

{

$id = $data['user_id'];

$title=$data['title'];

$date=$data['date'];

$notice=$data['notice'];

?>

<item>

<title><? echo $title; ?></title>

<pubDate><? echo $date; ?></pubDate>

<description><? echo $notice; ?></description>

<link>http://www.xxx.com/?exploit=<? echo $id; ?></link>

</item>

 

<?

}

echo "

</channel>

</rss>";

?>

 

It doenst work..why ???

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/
Share on other sites

try:

 

<?php
include ("dbconfig.php");

header("Content-type: text/xml\n\n");
print"<?xml version=/"1.0"/ encoding=/"ISO-8859-1"/?>";
print"<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>
";
?>
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483467
Share on other sites

cleaned it up it should work have a nice day ;D

 

 

<?php
include ("dbconfig.php");
header("Content-type: text/xml\n\n");

echo"

<?xml version=1.0 encoding=ISO-8859-1?>
<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>";
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483481
Share on other sites

<?php
include ("dbconfig.php");
header("Content-type: text/xml\n\n");

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
<rss version=\"2.0\">
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>
";
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483489
Share on other sites

cleaned it up it should work have a nice day ;D

 

 

<?php
include ("dbconfig.php");
header("Content-type: text/xml\n\n");

echo"

<?xml version=1.0 encoding=ISO-8859-1?>
<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>";
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

 

should this not be:

 

<?php
include ("dbconfig.php");
header("Content-type: text/xml\n\n");

?>

<?xml version="1.0" encoding=ISO-8859-1?>

<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10") or die(mysql_error());
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

?>
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>
<?php


}
?>
</channel>
</rss>

 

hope this helps,

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483491
Share on other sites

uniflare the variables wont parse outside of the tags ;)

 

 

this is the correct code from above

 

 

<?php
include ("dbconfig.php");

header("Content-type: text/xml\n\n");?>
<?xml version=/"1.0"/ encoding=/"ISO-8859-1"/?>
<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>

<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483493
Share on other sites

oops dint notice those, here:

 

<?php
include ("dbconfig.php");
header("Content-type: text/xml\n\n");

?>

<?xml version="1.0" encoding="ISO-8859-1" ?>

<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>
<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10") or die(mysql_error());
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

?>
<item>
<title> <?php echo($title); ?></title>
<pubDate> <?php echo($date); ?></pubDate>
<description> <?php echo($notice); ?></description>
<link>http://www.xxx.com/?exploit=<?php echo($id); ?></link>
</item>
<?php


}
?>
</channel>
</rss>

hope this helps, 

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483494
Share on other sites

try using =\"whatever\"

 

 

<?php
include ("dbconfig.php");

header("Content-type: text/xml\n\n");
echo"
<?xml version=/"1.0/" encoding=/"ISO-8859-1/"?>
<rss version=2.0>
<channel>
<title>World</title>
<description>WAS</description>
<copyright>Copyright 2008, xxx.com</copyright>
<link>http://www.xxx.com/rss.php</link>
<language>ENG</language>";?>

<?php
$a=mysql_query("select * from notice_table ORDER BY user_id DESC LIMIT 10");
while ( $data = mysql_fetch_array($a) )
{
$id = $data['user_id'];
$title=$data['title'];
$date=$data['date'];
$notice=$data['notice'];

echo "
<item>
<title> $title</title>
<pubDate> $date</pubDate>
<description> $notice</description>
<link>http://www.xxx.com/?exploit=$id</link>
</item>";


}
echo "
</channel>
</rss>";
?>

Link to comment
https://forums.phpfreaks.com/topic/94395-noob-rss-problem/#findComment-483500
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.