[php] Making Feeds Rss

free web hosting
Free Web Hosting > Computers & Tech > Programming

[php] Making Feeds Rss

Impious
Making feeds RSS with PHP

I'm sorry if someone had already posted about it, but I have made some searches
and did not find anything simmilar.

RSS, very used nowadays by most of sites and it is one of the innovations that
came with the famous Web2.0
For who doesn't know, RSS is a subset of dialects XML that are use to join content or
Web syndication could be acceded by programmes/websites packers.
It is used mainly in sites of news and blogs.
The abbreviation of RSS is used to refer to the following patterns:

- Rich Site Summary (RSS 0.91)
- RDF Site Summary (RSS 0.9 e 1.0)
- Really Simple Syndication (RSS 2.0)


The technology of RSS allows to the users of the internet to enroll in sites that supply
feeds RSS. Those are typically sites that changes or update their content regularly.
For that, they are used Feeds RSS that receive these updatings, of this it sorts out the user
can stay informed of several updatings in several sites without needing to visit them one to one.
The feeds RSS offer content Web or content summaries together with the links for
the complete versions of this content and other data.
This information is given as a file XML called RSS feed, webfeed, Atom or still channel RSS.
An example of as it should follow our RSS

CODE
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>Asta Feeds</title>
<description>Astahost Forum Feeds</description>
<link>http://www.astahost.com/index.php</link>
<language>eng-uk</language>
<item>
<title>Columm Title</title>
<description>Columm Description</description>
<lastBuildDate>Feeds Date</lastBuildDate>
<link>http://www.astahost.com/index.php?action=feeds&id=1>/link>
</item>
</channel>
</rss>


Tags above, are pattern Tags that it should be maintained.
Only what will vary inside of the tags above it is TAG <item></item>.
we will create the item tag in the amount of columns or registrations that we will look for in the database.

Now the code php that makes the magic:


Feed RSS:
CODE
<?
$rss = '<?xml version="1.0" encoding="iso-8859-1"?>';
$rss .= '<rss version="2.0">';
$rss .= '<channel>';
$rss .= '<title>Asta Feeds</title>';
$rss .= '<description>AstaHost Forum Feeds</description>';
$rss .= '<link>http://www.astahost.com/index.php</link>';
$rss .= '<language>eng-uk</language>';

Database Conection:
CODE
$connect = mysql_connect('localhost','username','password');


Selecting Database:
CODE
mysql_select_db('base',$connect);
$rs_rss = mysql_query("SELECT id, title,description,date FROM table_colums ORDER BY date DESC LIMIT 20", $connect);


Creating a varible $content NuLL
CODE
$content = "";


Adding contents to the variable($contents):
CODE
while($creating=mysql_fetch_object($rs_rss))
{
  $content .= '<item>';
  $content .= "<title>$creating->title</title>";
  $content .= "<description>$creating->description</description>";
  $content .= "<lastBuildDate>$creating->date</lastBuildDate>";
  $content .= "<link>http://www.astahost.com/index.php?action=feeds&id=".$creating->id."</link>";
  $content .= '</item>';
}
[code]

[i]Together $rss plus $content to $xml:[/i]
[code]$xml = $rss.$content;


Closing the tags
CODE
$xml .= '</channel></rss>';




After we create our rss, we will record it in disk for us to use.

This opens the file for reading and writing; it puts the pointer of the file in the beginning
and it decreases (it truncates) the size of the file for zero.
If the file doesn't exist, try to create it (w+).

CODE
$feedsfile = fopen('folder/articles.xml','w+');


Recording into artivles.xml
CODE
fwrite($feedsfile,$xml);


Closing file
CODE
fclose($feedsfile);
?>


This code searchs on database, returns the last twenty registers and save into .xml document.

Yours, Impious

 

 

 


Reply

Sten
while your talking about feeds, do you or does anyone else know how to embed just a little thing of how many people are online

the address for the online thing is http://www.habbo.com.au/habbo_count_xml.action

i just need to know how to embed that, it just shows how many people are on that site.



Reply

toby
Similar to his, I want to make a rss feed out of a news page on another site, how would I do this? Something like a socket, loops and arrays, but I'm really not sure.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. code for rss feed php - 374.97 hr back. (1)
Similar Topics

Keywords : , php, making, feeds, rss

  1. Making Educational Game
    3d game, like walking in country (3)
  2. Making Xp Look Like Vista
    (3)
    QUOTE For those that are not planning to install Windows Vista anytime soon, and want the styles
    and feel Vista has to offer when it comes to eyecandy and functionality, there are a few ways you
    can do this which can change not only the skins to Vista, but also icons, menus and your bootup
    screens. The most popular aspect of Vista is its Aero - Transparency and 3D Flip. To get opaque
    windows on Windows XP, you can try out a various software packages. Forget WindowsBlinds, thats not
    a true enablement of the Vista experience, what you really need is the BricoPack Vis....
  3. Help With Making A Textbased Game
    Help With Making A Textbased Game (6)
    hey i really want to make a web text based game like www.hattrick.org i really want it and i have a
    host .... i want to know where i can find a tutorial for it or what programs i need to use and....
    plz help me thanks....
  4. Help With Making A Textbased Game
    im new to text based games (2)
    I'm new to text based games and i want to learn how to make them can someone teach me the basics
    or the starting of a text based game....
  5. I Really Need Help
    Help with making a city! (5)
    I am currently making a game using MCcodes V2.2 and when its installed etc.. it wouldnt let me make
    a city. It kept saying Notice: Undefined index: minlevel in
    /www/rack111.com/g/a/n/(mygamename)/htdocs/staff_cities.php on line 18 Notice: Undefined index:
    name in /www/rack111.com/g/a/n/(mygamename)/htdocs/staff_cities.php on line 19 Notice: Undefined
    index: desc in /www/rack111.com/g/a/n/(mygamename)/htdocs/staff_cities.php on line 20 Please can
    someone help me! Thanks ....
  6. Need Help Making My Ftp Work
    my ftp is not working (14)
    I get this message: Status: Resolving IP-Address for ftp.losangelesmagazine.net Status: Connecting
    to 68.178.232.100:21... Error: Connection timed out Error: Could not connect to server I have used
    this this ftp before so I know it works. Is there any help anyone can give me? I would really
    appreciate any help with this and anyother topic I posted as I just activated my account today and
    I'm trying to figure out what to do to make this work so I can upload wordpress. I used the
    server and users name that I saw on cpanel and the message above is what I got. Tha....
  7. My Guide On Runescape Making Millions
    guide (4)
    Alright so you want to make millions in 2 hours. First you need to work yourself up to get the
    millions, What you do is with about 60+ str kill flesh crawlers and start fishing. Once you have 300
    k cash start tanning Green d hide; Which after tanned will be called green leather. Math: 300 000
    spent on supplies. Around 500 green d hides can be tanned every 15 mins. Buy green d hide at med,
    Which would cost 1698 ea. Which will get you about 177 which you can do in like 2 mins. You sell the
    green d hide back for 1850 ea, A little below med price. Which is 327 000 thats ....
  8. Need Help In Game Making
    blender (3)
    ok i need someone to look up a game maker that i can down load it has to be like blender since i do
    not know how to program but if you do ty i need to make my own website with a bunch of games.....
  9. Calendar And The Date () Function
    Making Math Simple With Modular Arithmetic (0)
    In my days of calendar making I've encountered a few minor inconveniences. When you try to make
    a calendar, you have to find a few specific things: (1) the first day of the month, (2) how many
    days are in the month, and (3) what today's date is. The second and third ones are easy to find.
    Before we start making a calendar, though, let's set some ground rules: CODE define
    ('TS', time ()); Now we can find (2) and (3) from above: CODE
    $total_days = (int) date ('t', TS); $todays_date = (i....
  10. Help Me Make A Guide To Website Making!
    HELP! (0)
    I been wanting for a time now to make a guide to website making, i now i have have decided im going
    to, i will need colleagues, if anyone has medium knowledge in this area it would be nice if they
    could be the co-author (or probably the main as i am 10). CSS would be a VERY good thing to know as
    i am only reasonable in HTML/XHTML. all credit will be shared. P.S. you are probably thinking "this
    idiot is a newbie and hes only ten" please do not, i have been doing html for a while now and i
    really beleive i can do this, if you want i could even give you FULL credit for ALL ....
  11. Making A Value In A Textbox Stay
    (4)
    Hey! I know it is possible, but I don't know how to do it. Anyone who know how I can make
    the following: When a user type a message, and press Send, he will come to a page that will check
    the message. If an Error occur, the user must press a button, that will take him back to the
    message, and fix the error. but The problem is, that when the user press the button, his message is
    gone, and he must write it again. bad luck, if the message was long. Hope You undertsand what I want
    /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> ....
  12. Making Something In Mysql Happen Only Once
    (10)
    Hey! I know I am asking alot. But much is happening theese days. Sorry if I disturb with my
    questions. The thing I am trying to do is: Ex. If the user becomes level 2, he should get 5 skill
    points. I can't do this: CODE if($userlevel=5){ mysql_query("UPDATE
    user SET skillpoints =$points+5");} because then it would update everytime the code
    was loaded. I hope you understand what I am trying to do. If not, tell me /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> and i'll try to explain....
  13. Making A Link = Mysql_query
    (8)
    Hey! I will try to make this as clear as possible. how can I make the following. I have a
    list, of all members on my site. If I press on a members name(link), I will come to his profile. To
    come to his profile, I need to get out some vaule from the database, but to get out some value from
    the database, I must tell the code, how it should know who the user is (hard to understand?). To do
    that, I must add a mysql_query in the code ( I think), like "SELECT user FROM dbname WHERE
    user=link".. This is just how I think it works. I know it is kinda wrong.. but I don'....
  14. Making Xubuntu Look Like Windows Vista
    (6)
    Quite a nice blog actually. It might help you to decide to give Xfce another go in case you just
    don't get along with KDE. http://xubuntublog.wordpress.com/2008/02/1...p-with-xfce-44/
    _________________________________ http://dserban01.googlepages.com/linkedin....abap.basis.html ....
  15. Making Xp Starts 60% Faster
    Making your windows xp starts faster and avoid hang ups. (3)
    By the way this is not my post I have found it in my pc and I forgot the source of it. I'll just
    share it here.
    ----------------------------------------------------------------------------------------------------
    ------------------------- QUOTE Making Windows XP Start 60% Faster Stopping Unneeded Startup
    Services Along with the core operating system and programs that Windows XP runs when it starts,
    there is also a host of services involved. Many of these services are necessary for Windows XP to
    operate correctly. However, many of them are for features in Wind....
  16. Making Fake Virus In Vbs
    (0)
    Note: Use this to freak out your friends.lol 1. Open notepad 2. Type this in notepad
    lol=msgbox("Warning virus Found!","Virus Found!") 3. Save it as virus.VBS 4. Enjoy....
  17. How Can We Make Our On O/s ?
    The ways of making our own computer !! (1)
    Please define --- here thnx....
  18. How Can We Make Our On O/s ?
    The ways of making our own computer !! (3)
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Now we are
    trying to compete with MICROSOFT WINDOWS ....... /wink.gif" style="vertical-align:middle"
    emoid=";)" border="0" alt="wink.gif" /> /wink.gif" style="vertical-align:middle" emoid=";)"
    border="0" alt="wink.gif" /> Plz write ur ideas of including in our O/S .... NAMES -
    SUGGESSTONS--LOGOS--STARTING....
  19. [photoshop] Making An Orb
    (1)
    First Step: After openned the photoshop, make a new image and resize to 150 x 150... Second
    Step: Make a new layer and click on Elliptical Marquee Tool... Holding the Shift key do a lap do
    this black... Third Step: Go to Layer -> Stroke and do like this: Size: 3pixels Position:
    Inside Blend Mode: Normal Opacity: 100% Fill Type: Color Color: White Fourth Step: Do a
    right click at the same layer and go to Color Overlay and choose a color you likes... After that go
    to Inner Shadow and change the size to 70... After that mark the Drop Shadow and....
  20. Making Animated Gifs
    (5)
    Is it possible to make animated images using PHP's GD library? I've done searches, and I
    can't find anything that explains it fully, or doesn't need you to download a special
    program, which obviously, I couldn't use with Astahost. Can anyone help? I'm not aure how
    animated gifs work, I don't know if all the frames are compressed within the .gif file as
    separate images, or whether it's structured another way.....
  21. Making A Turn Based Game Like Ogame
    Help would be nice =D (9)
    The Idea came to me and Just wanted to know what kind of code I'll need to know ect ect Also
    Help would be nice, because I'm kind of fresh =D x....
  22. Programming In Glut (lesson 4)
    Making 3D objects (7)
    Hello, in this tutorial we will be creating a 3D pyramid. We are building this tutorial from Lesson
    3, but I took out the 2D objects and placed a 3D pyramid in there instead. The 3rd axis for drawing
    can be a litle confusing, but after you get the hand of it you'll do fine. Now when you are
    setting a 3D vertex just remember that the camera is on the positive end of the z axis. So things
    that have a more positive z axis value are closer than verteces with a more negative value. Well
    let's get started We always start by including the glut library CODE #i....
  23. Advice About Making A Text Based Game
    (9)
    I got my Astahost account in hopes of making a multi-player, online, text-based game in real time.
    What I need help with is the programming side of things, a little advice really. I talk to the
    maker of a similar type game that I play, and he suggested I learn PHP with MySQL and ASP, and I
    cant really remember if he said anything else. I have been playing around a little with PHP and
    only dabbled with MySQL, but I know nothing of ASP except that it stands for Active Server Pages.
    So basically, the advice I'm looking for is, what kinds of scripting/coding would pe....
  24. Oh Man, Need Help Making Basic Calc In Console App
    (5)
    I'm stressing out here >_ can keep adding when i type numbers in until i type '-1' AFter
    that -1 it would: give me the total number of entered(+1 each time a number is added), total scores
    combined, and an average of total scores/total numbers entered. Sad thing is, I'm much better
    on GUI /sleep.gif' border='0' style='vertical-align:middle' alt='sleep.gif' /> I made one in GUI
    so easily, I guess console is that different. I can get the average, but the scores and total
    numbers won't go sometimes.....
  25. Animation?
    Making words move? (4)
    Can you make words move on a website when a person comes into it? If so, how? /huh.gif' border='0'
    style='vertical-align:middle' alt='huh.gif' /> ....
  26. Want To Make Your Oun PC Games Then Read This
    Come on you can start making games today (6)
    Hello, i just want to tell every one here about this game maker that i have been using for a year or
    so well it is free but you can also reg'it. you can make just about anything rpg's
    orpg's mmorpg's maze games anything and the best thing is even your grandmother could make
    games thats how easy things can be. click here for site with download of and examples that you can
    edit and change stuff the Community click here with people that will help you wit your games and
    stuff and examples and there are forum where you can request music and graphics rep....
  27. Flash Site Software
    Help need for nice flash making software (11)
    Hello iam a newbie in flash ,And i want to make a Website Using flash, Can someone show me some easy
    to understand flash making software,I have macromedia flash mx but i dont understand a word in
    that..! its very complicated..! As i need an easy to use software..! /sad.gif'
    border='0' style='vertical-align:middle' alt='sad.gif' /> ....
  28. (Nearly) Ultimate Music Posting Guide
    Making your music available online (11)
    The (Nearly) Ultimate Music Posting Guide For several years, indie and established musicians
    relied on MP3.com as their primary off-site music host. While there were a small number of other
    similar sites, and MP3.com had its share of problems, it was still THE place to get your music
    posted. It also allowed artists and music fans to create "Stations" where customized playlists could
    be created and shared with the world. Vivendi Universal eventually bought MP3.com and ultimately
    shut it down only to rebuild it as a site for "established" artists, leaving all of the in....
  29. Making A Logo In Paint
    Very easy... (20)
    It is very easy to make your own, professional logo in Paint. When I say Paint I mean Microsoft
    Paint. OK now, let's begin. First off you need a background. I will take this one for example.
    You can use it if you want to. Now we need to make a color. Double click on one of the colors at
    the bottom of the page. Click on "Custom Colors" and make a color that fits good with your
    background. Once your done, continue on. Now, you need to make a text. First off, search Google for
    a cool font. Then, install it on your computer. Now that your ready, read this. Select ....
  30. Stop anything from making it ur homepage!
    (52)
    I found out that you can override any homepage setting in Internet Options. If you have spyware, or
    come accross it frequently, then this is a very good tweak for you. 1. Right-click on the IE icon
    on your desktop. 2. Select Properties 3. Now in the "Target" box you will see "C:\Program
    Files\Internet Explorer\IEXPLORE.EXE" Now by adding the url of the site to the end of
    this it overrides any Homepage setting in internet options. ex: "C:\Program
    Files\Internet Explorer\IEXPLORE.EXE" www.sdgamerz.tk Note: This works only with a cust....

    1. Looking for , php, making, feeds, rss

Searching Video's for , php, making, feeds, rss
Similar
Making
Educational
Game - 3d
game, like
walking in
country
Making Xp
Look Like
Vista
Help With
Making A
Textbased
Game - Help
With Making
A Textbased
Game
Help With
Making A
Textbased
Game - im
new to text
based games
I Really
Need Help -
Help with
making a
city!
Need Help
Making My
Ftp Work -
my ftp is
not working
My Guide On
Runescape
Making
Millions -
guide
Need Help In
Game Making
- blender
Calendar And
The Date ()
Function -
Making Math
Simple With
Modular
Arithmetic
Help Me Make
A Guide To
Website
Making!
- HELP!
Making A
Value In A
Textbox Stay
Making
Something In
Mysql Happen
Only Once
Making A
Link =
Mysql_query
Making
Xubuntu Look
Like Windows
Vista
Making Xp
Starts 60%
Faster -
Making your
windows xp
starts
faster and
avoid hang
ups.
Making Fake
Virus In Vbs
How Can We
Make Our On
O/s ? - The
ways of
making our
own computer
!!
How Can We
Make Our On
O/s ? - The
ways of
making our
own computer
!!
[photoshop]
Making An
Orb
Making
Animated
Gifs
Making A
Turn Based
Game Like
Ogame - Help
would be
nice =D
Programming
In Glut
(lesson 4) -
Making 3D
objects
Advice About
Making A
Text Based
Game
Oh Man, Need
Help Making
Basic Calc
In Console
App
Animation? -
Making words
move?
Want To Make
Your Oun PC
Games Then
Read This -
Come on you
can start
making games
today
Flash Site
Software -
Help need
for nice
flash making
software
(Nearly)
Ultimate
Music
Posting
Guide -
Making your
music
available
online
Making A
Logo In
Paint - Very
easy...
Stop
anything
from making
it ur
homepage!
;
advertisement




[php] Making Feeds Rss



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE