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
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
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
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
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
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
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
Share on other sites

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

 

im using zend 5.5.1 for run the script...

 

and Zend is making red underline for these words version and encoding

 

also it gives an error

 

Parse error: syntax error, unexpected T_STRING in /home/.wings/world/rss.php on line 7

Link to comment
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
Share on other sites

when I use <?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> like that

 

Zend is underlying another sentences and version word...anyway..

 

Have you working script like that, could you give me!

 

Maybe I can modify the another script..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.