homepage Welcome to WebmasterWorld Guest from 54.198.94.76
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

    
RSS Feed error.Pls Help
hibuddy




msg:1541410
 10:40 pm on Sep 28, 2005 (gmt 0)

Hi

I have tried creating a rss.php file for my sit e. I just used the exact model which I found at one site. Ofcourse I used this model also. I got the following error on both cases. Please help me figure our what is wrong. I have been trying for 2 days now. Do I need to ask my web hosting company to add any MIME type?.

Error I got is
Parse error: parse error, unexpected T_STRING in example.com/rss.php on line 1

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

<channel>

<title>All Widgets Reviewed</title>
<description>If it's a widget, we review it. Learn what widgets are hot and what's not!</description>
<link>http://example.com</link>

<item>
<title>Nokia 3650 Combines Phone And Photos</title>
<description>I've been playing with the new Widget 3650. Finally, someone has got the combination of a cell phone with digital camera capabilities right!</description>
<link>http://example.com/nokia3650.html</link>
</item>

</channel>
</rss>

Thanks in advance

[edited by: werty at 4:21 am (utc) on Sep. 29, 2005]
[edit reason] Removed URLS - Please see TOS #13 [/edit]

 

encyclo




msg:1541411
 3:56 pm on Sep 29, 2005 (gmt 0)

Your problem is probably the XML prolog - it uses a similar syntax to PHP so it can cause a parsing error. You can echo the XML prolog with PHP instead which sould solve the problem:

<?php echo '<?xml version="1.0" encoding="ISO-8859-1"?>'; ?>

from memory - I hope I haven't made an error!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved