Forum Moderators: open
When opened with Internet Explorer, the xml renders fine. When I create another page with ASP to open and display the XML, that works great too. But a couple of people using PHP report that their server won't open the ASP-generated XML. The XML is an RSS NEwsfeed, but it is dynamic - could change every 2 minutes, so putting it in a static XML file on my server is not an option.
Do I have an issue with headers? Could that be why PHP scripts don't see the output as XML?
Here is the code for the meat of my script - I have left out the loops for dynamic data, but each loop creates a new item and it all renders fine, except if you're pulling it with a PHP reader. Anyone here created an XML/RSS feed with ASP and found this issue?
<?xml version="1.0" encoding="ISO-8859-1"?>
<% Response.Buffer = true
Response.ContentType = "text/xml"
%>
<rss version="2.0">
<channel>
<title>My Title</title>
<link>My Link</link>
<description>My Descriptiondescription>
<language>en-us</language>
<copyright>Copyright info</copyright>
<lastBuildDate><%=Now()%></lastBuildDate>
<ttl>20</ttl>
<item>
<title><%=Dynamic Data%>
</title>
<link><%=Dynamic Data%>
</link>
<description><%=Dynamic Data%>
</description>
</item>
</channel>
</rss>
<generator></generator>
<managingEditor></managingEditor>
tags inside the <channel> tag
and I don't have these tags:
<lastBuildDate></lastBuildDate>
<ttl></ttl>
I doubt thats causing an issue though.
Do you know if the php reader has support for RSS2?
1 - PHP Webmaster #1 hadn't permissions to use fopen.
2 - PHP Webmaster #2 is hosted overseas and the server can't see mine. That one's bizarre... I can traceroute to it, not blocking ports, but oh well.
What clued me in was when I got my third PHP Webmaster yesterday. He implemented my sample reader code on a site he hosts with GoDaddy and he reported that it worked flawlessly. I had presumed that because the first two PHP webmasters to sign up couldn't open my feed, it must have been incompatibility between my feed and PHP. Many thanks again for all input.