Click to See Complete Forum and Search --> : How they are doing that?
http://www.articlesender.com/rss.php?c=118
I can see that the file is not .xml file but .php.
How they created it that way?
Can I do it with ASP as well?
Where can I learn about it?
NogDog
03-12-2006, 03:14 PM
Any scripting language should be able to output XML. It's likely that the PHP example you provided starts its output with a header("Content-type: text/xml");, and then simply outputs the XML declaration and XML content as normal.
I See. How do I do it with ASP?
Is there any tutorial out there?
NogDog
03-12-2006, 03:44 PM
I See. How do I do it with ASP?
Is there any tutorial out there?
I don't know ASP, but I will move this thread into the ASP forum and see if any of the experts there can help you out.
chrismartz
03-12-2006, 07:54 PM
In your first line, give the page a content type like this<% response.ContentType = "text/xml" %>
albertindian200
03-14-2006, 11:36 PM
HI friend,
below is the code for asp RSS
It is running perfectly in my website http://www.bepenfriends.com
Code begins here
===========
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="0.91">
<% Response.ContentType = "text/xml" 'count the xml subscription view to 1 generate xml from database below is the header of rss file describes about the rss feed%>
<channel>
<title>Free online dating website Bepenfriends with free dating singles and free photo personals ads</title>
<link>http://www.bepenfriends.com/penpals/dating_articles/</link>
<description>Free online dating website,free dating singles search with photo personal ads for your dating needs at bepenfriends. One of the free online dating websites. A totally free online dating website and free dating articles for dating tips</description>
<language>en-gb</language>
<%
' body start
sql="Your query"
constr=connectionstring comes domainname="http://www.bepenfriends.com/penpals/penpals/"
set db=server.CreateObject("ADODB.Connection")
db.Open constr
if err.number <> 0 then
Response.Write err.number & err.Description
Response.End
end if
set rs=db.Execute(sql)
x=1
do while not rs.eof
if not x > 10 then
Response.Write "<item><title>" & rs("name") & "</title>"
Response.Write "<link>" & domainname & rs("link") & "</link>"
Response.Write "<description>" & rs("description") & "</description>"
Response.Write "</item>"
x=x + 1
else
exit do
end if
rs.movenext
loop
' body ends
' below is the footer of the rss
db.Close
set db=nothing
%>
</channel>
</rss>
===========
Code ends
Remember the first line or the first chunk must have the XML tags orelse rss will not be validated
All the best
Albert
http://www.bepenfriends.com Wanna date
Oh... I see now!
Thanks a lot!!!