|
news and events |
|
2014-07-10
EV1 and The Planet Announce MergerCombination Creates Industry-leading Dedicated Hosting Company; Combined Company Will Continue to Deliver Industry-leading Client Experience
Houston, Texas and Dallas, Texas | May 6, 2006: Everyones Internet (EV1) and The Planet, two leading suppliers of dedicated hosting, declared today they have merged. |
|
|
|
2012-05-28
Vodacom promotion continuesVodacom has extended its MyGig one and MyGig two info contract promotion, which offers 1GB for R99 and 2GB for R149, to 31 July 2012. |
|
client comments |
|
"New era, yet classic, a fantastic designer with many talents..."
|
|
|
"Thanks, we checked out the site this weekend [and] we are really stoked! It really is what we are looking for..."
|
|
latest articles |
|
2014-06-14
Nature of the Work About this sectionAn overview and general explanation of Graphic Designers, their job and responsibilities.
|
|
|
2012-02-08
7 Essential Search Engine Optimisation ElementsWhen it comes to Search Engine Optimisation, many companies assume that getting results is as simple as adding keyword-stuffed webpages onto their sites. But there are several factors one should know about...
|
|
We Accept:
|
|
Creating an RSS Feed Using PHP
2008-05-10
Creating a script which outputs an RSS feed is almost easier than going to Google and finding one to integrate into your project. In fact, if the script you're trying to add this ability to doesn't already have RSS feeds, chances are you're best off writing it from scratch anyway, that way the code is targeted directly towards your problem. In this brief web development tutorial, I'll show you a quick and clean way to integrate RSS using PHP.
To create this script, we need to understand the RSS file format and then craft a script in PHP that outputs valid RSS. Obviously we'll need content to parse into RSS, otherwise what's the point, right? Your CMS or article system provides this content, so let's take a look at what an RSS feed looks like:
xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" > The document's title http://localhost An RSS feed example en-us Mon, 28 Jan 08 10:05:32 -0800 Mon, 28 Jan 08 10:05:32 -0800 http://localhost/rss.php yourscript's name Articles contents http://localhost/index.php?article=1 December 07th, 2007 03:50 PM Now that we know the format, the only thing will need to do is get our dynamic content in here. Of course, that will depend on the situation and the code that you're plugging this into. For the sake of an example, consider the following code:
xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" >
<?PHP echo $articleIteration['title'];?> en-us yourscript's name <?PHP echo $articleIteration['title'];?> ]]> ]]>
In the above example we have an RSS feed generated in the foreach loop. This loop would need to be populated with article data from a database, but the form and function are directly here in this script. Feel free to integrate this code into your web development or web design projects and enjoy.
View other articles in the Web Development category.
View other articles in the PHP sub-category. |