Home: PHP Diary | Script School | PHP Scripts | TD Scripts.com
Guts or Glory Poker PHP - A casino-style card game written entirely in PHP


[back]
go back12/31/02 "Introduction to XML, RSS / RDF" go forward[next]

XML, RSS, RDF & PHP

In my ever-expanding effort to make these diary entries more useful and readable, I've created an XML RSS 0.91 feed and a special syndication section here at php-scripts.com. For some in the audience saying, "what is RSS?" well, basically it is a way to share news headlines with other sides in a universal format. The problem with RSS as of this writing is there are currently *7* different formats. I chose to make the first issue of this syndicated feed 0.91 because it is heralded as the being least complex of the 7 formats. For a good article history of RSS check out this article aptly entiled, What is RSS?

Copyright note: Let me be very clear to point out that while I'd very much like and encourage folks to link to these diary entries, I do not want the actual text of them taken or framed in other websites! These diary entries are copyrighted by me and while I'll try to make it convenient to find out what's going on and when through the use of the RSS feed (it has descriptive links to these pages), please link to the diary entries and do not copy and paste these diary entries onto your web sites. In fact, if you see someone else do this, then drop me a line and tell me about it. I'm sure their host / ISP would like to know they are using copyrighted material without permission.

Alright, enough of being/sounding like a cop, lol, I hate that stuff anyway.

Webmaster Usage for RSS

Now let me explain what use an RSS feed might have for you, the webmaster (and what I am using it for here at php-scripts.com). It is a way to syndicate something you update frequently on your website like news, a diary, new programs, etc and through headlines drive additional traffic to your websites. There are sites that list RSS feeds like syndic8.com. For example, I'm syndicating these diary entries now that I'm trying to do them on a regular basis again. This way other scripting/tech-related websites can use the RSS feed to find out when I've added a new diary entry. An example of what the RSS feed for the diary entry looks like is in the syndication section

Surfer Usage for RSS

It is also a way you can read the headlines, blogs, etc that you are specifically interested in a whole new way by using the (free as of the time of this diary entry) program like Headline Viewer: http://www.headlineviewer.com/download.html While I found this Visual Basic application is a bit slow and buggy (it is still in a beta state, so this is understandable), it gives you a good idea of what this whole RSS feed thing is all about. Try downloading that program (no spyware!) and then adding my diary as one of your feeds (if it's not already preloaded in the list) :) You can then add by clicking on the "settings" button and then inserting the syndication URL: http://www.php-scripts.com/syndicate/diary.rdf you will then want to categorize as you see fit (internet is a good suggested category or you can use 

I'll be the first to admit that I'm still fairly new to the world of XML. I've messed around with it a bit but I've not really done any significant work. I like the idea of these RSS feeds though. I think it makes it not only easier to syndicate in a general purpose format, it makes it more logical to do so, and it also can cut down on people trying to parse out your pages just to get to small pieces of information anyway. In theory, the more folks that use it, there should be less burden on resources.

The next question is where does PHP fit into all this RSS / RDF / XML stuff? There are some built-in functions to create your own XML parser.

PHP Built-in XML functions: http://www.php.net/manual/en/ref.xml.php

If you go to the manual pages you'll find all sorts of info on creating your own XML parser. Basically this means creating a tool which will take these pages in XML format and do something useful with them.

The W3C standards on XML: http://www.w3.org/XML/ 

Note: the W3C is the consortium is (to quote from their website): "The World Wide Web Consortium (W3C) develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential. W3C is a forum for information, commerce, communication, and collective understanding."

I've noticed in the process of using the validation that a lot of my pages here at php-scripts.com don't conform to the W3C specs. So I'm going to start using their XHTML 1.0 specs explained here: http://www.w3.org/TR/xhtml1/

For archival purposes: HTML 4.01: http://www.w3.org/TR/html401/ 

How to validate HTML pages?
You can validate your HTML pages here:
http://validator.w3.org/

One thing which I've kept erroneously omitting in my pages was the document type that goes at the top. It looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

Now, wait, what about XML-RPC?

This is beyond the scope of this particular diary entry, but you can also write your own XML-RPC server/client using PHP. I'm not ready to do that yet, but I'm putting the information here for primarily my own benefit when/if I do go decide to work on one. Not quite sure what the use would be for these diary entries yet, but when I figure that out, I'll be sure and write more on the subject. Here is another xml.com article explaining what XML-RPC is all about.

PHP built-in XML-RPC functions: http://www.php.net/manual/en/ref.xmlrpc.php

I didn't even mention SOAP yet, but I've thrown enough buzzwords into this diary entry. It's enough to make one's head spin!

Happy coding to you!
==============
New forum for discussion of diary entries

The homeroom at Script School is available to discuss this and other php-scripts.com diary entries. You must be an enrolled student at Script School to add comments to these diary entries.

Please vote on the usefulness of this diary entry so other people will know if it is worth their time to read :)

How useful was this diary entry? Avg Surfer Rating: 3.13 (24)

[back]go back 12/31/02 "Introduction to XML, RSS / RDF" go forward[next]

Home: PHP Diary | Script School | PHP Scripts | TD Scripts.com

Copyright 1999-2003 php-scripts.com Last Modified 12/31/02 02:15