Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,671 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,182 people online right now. Registration is fast and FREE... Join Now!




RSS FEED PROBLEM!

 
Reply to this topicStart new topic

RSS FEED PROBLEM!

Xmod
post 27 Jul, 2007 - 05:37 PM
Post #1


New D.I.C Head

*
Joined: 19 Jan, 2007
Posts: 35


My Contributions


Im trying to make my rss feed work with php, i've never done this before but i think im getting there...

I am not able to get it to work, I think I am doing everthing correct.... here is the code and url.

http://chile.publicapropiedades.com/rss/rss.xml

CODE

<rss version="2.0">
<channel>
<title>Publica Propiedades - www.publicapropiedades.com</title>
<description>Publica Propiedades Gratis en Chile!</description>
<link>http://chile.publicapropiedades.com/</link>
<copyright>Publica Propiedades © 2007-2008</copyright>
<? require_once("conn.php") ?>

<?
$q1 = "select * from re2_listings, re2_agents where re2_listings.AgentID = re2_agents.AgentID and re2_listings.AgentID!=0 and re2_agents.AccountStatus='active' order by ListingID desc limit 1,20";
$r1 = mysql_query($q1) or die(mysql_error());

    while($a1 = mysql_fetch_array($r1))
    {
?>
     <item>
        <title>Test</title>
        <description>Test</description>
        <link>http://chile.publicapropiedades.com/info.php?id=<?=$a1[ListingID]?></link>
     </item>  
<? } ?>  
</channel>
</rss>


thanks.
User is offlineProfile CardPM

Go to the top of the page

Nova Dragoon
post 27 Jul, 2007 - 06:04 PM
Post #2


The Innocent Shall Suffer, Big Time

Group Icon
Joined: 16 Aug, 2001
Posts: 6,128



Thanked 4 times

Dream Kudos: 515

Expert In: Python, Linux

My Contributions


is your webserver configured to execute .xml file extensions through php?

try renaming your feed to .php
User is online!Profile CardPM

Go to the top of the page

Xmod
post 27 Jul, 2007 - 10:44 PM
Post #3


New D.I.C Head

*
Joined: 19 Jan, 2007
Posts: 35


My Contributions


Yeah! I did some research and added this line "AddType application/x-httpd-php .xml" to to httpd.conf on the server and it works now thanks!
User is offlineProfile CardPM

Go to the top of the page

Styx
post 4 Aug, 2007 - 10:21 AM
Post #4


D.I.C Head

Group Icon
Joined: 4 Mar, 2007
Posts: 192



Dream Kudos: 225
My Contributions


Another option would be to have a php script generate the xml file for you.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:03AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month