Tech Note: Code Frenzy Continued

Technology • Views: 2,742

As I mentioned yesterday, I recently discovered that the LGF server was running PHP 5, not PHP 4 as I thought, and I’ve been like a geek in a gadget store ever since.

For years, the RSS news and blog feeds in our left sidebar were driven by a PHP 4 class called Magpie RSS, but now I’ve rewritten the LGF code to use PHP 5’s native SimpleXML functions.

The RSS format was pretty straightforward, but ATOM feeds required a little more geekage, because to do it right you have to properly handle an XML feature called “namespacing” while parsing the feed. The PHP SimpleXML documentation is rather … ahem … sparse on exactly how to do this, but this article at IBM’s developerWorks was very helpful: SimpleXML processing with PHP. And this comment at the PHP website showed me how to auto-detect whether an XML file is RSS or ATOM.

And now, we return to our regularly scheduled open thread.

Jump to top

Create a PageThis is the LGF Pages posting bookmarklet. To use it, drag this button to your browser's bookmark bar, and title it 'LGF Pages' (or whatever you like). Then browse to a site you want to post, select some text on the page to use for a quote, click the bookmarklet, and the Pages posting window will appear with the title, text, and any embedded video or audio files already filled in, ready to go.
Or... you can just click this button to open the Pages posting window right away.
Last updated: 2023-04-04 11:11 am PDT
LGF User's Guide RSS Feeds

Help support Little Green Footballs!

Subscribe now for ad-free access!Register and sign in to a free LGF account before subscribing, and your ad-free access will be automatically enabled.

Donate with
PayPal
Cash.app
Recent PagesClick to refresh
The Pandemic Cost 7 Million Lives, but Talks to Prevent a Repeat Stall In late 2021, as the world reeled from the arrival of the highly contagious omicron variant of the coronavirus, representatives of almost 200 countries met - some online, some in-person in Geneva - hoping to forestall a future worldwide ...
Cheechako
3 days ago
Views: 119 • Comments: 0 • Rating: 1
Texas County at Center of Border Fight Is Overwhelmed by Migrant Deaths EAGLE PASS, Tex. - The undertaker lighted a cigarette and held it between his latex-gloved fingers as he stood over the bloated body bag lying in the bed of his battered pickup truck. The woman had been fished out ...
Cheechako
2 weeks ago
Views: 280 • Comments: 0 • Rating: 1