plodos Posted March 5, 2008 Share Posted March 5, 2008 <? 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 ??? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 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>"; ?> Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 cleaned it up it should work have a nice day <?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>"; ?> Quote Link to comment Share on other sites More sharing options...
plodos Posted March 5, 2008 Author Share Posted March 5, 2008 Parse error: syntax error, unexpected T_STRING in /home/.wings/xxxxxxx/rss.php on line 6 line 6 : <?xml version="1.0" encoding="ISO-8859-1"?> Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 <?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>"; ?> Quote Link to comment Share on other sites More sharing options...
uniflare Posted March 5, 2008 Share Posted March 5, 2008 cleaned it up it should work have a nice day <?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, Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 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>"; ?> Quote Link to comment Share on other sites More sharing options...
uniflare Posted March 5, 2008 Share Posted March 5, 2008 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, Quote Link to comment Share on other sites More sharing options...
plodos Posted March 5, 2008 Author Share Posted March 5, 2008 <?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 Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 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>"; ?> Quote Link to comment Share on other sites More sharing options...
plodos Posted March 5, 2008 Author Share Posted March 5, 2008 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.. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 5, 2008 Share Posted March 5, 2008 might want to check into the parsor functions for XML http://us2.php.net/xml Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.