stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Parsing the News.com RSS feed with PHP







Parsing the News.com RSS feed with PHP

Parsing the News.com RSS feed with PHP 12/11/2003 02:48 AM

CNET Dec 11 2003 2:44AM ET




This is a GrokNews Entry: (what is grok?)





Similar Items

Parsing the News.com RSS feed with PHP

Grok Headline matches for Parsing the News.com RSS feed with PHP

Making the News: Parsing RSS Feeds With
PHP


Making the News: Parsing RSS Feeds With
PHP
11/13/2002 08:59 AM

PHP news feed available


PHP news feed available 12/02/2002 11:15 AM
The news of PHP.net is available now in RSS 1.0 format via our new statical news.rss file. You can add this file to any news reader or portal site to get the latest official PHP news. We strongly recommend you to cache the contents locally on your side, as the newsfeed is updated daily. The RSS file is available on every mirror site.

RSS News Feed Generator


RSS News Feed Generator 04/07/2005 05:48 AM
RSS News Feed Generator
http://landma rk-project.com/rssnewsfeed/index.php

This web tool is designed to help teachers and students create RSS feeds for aggregating news stories from 4500 sites in Google News, that are related to curriculum topics and issues. The resulting feed addresses and utilizes a feed builder constructed by Justin Pfister and can be placed in your news aggregator such as Bloglines or your own RSS news aggregator software. Many thanks to Justin for his exceedingly useful tool. Also, this web tool was inspired by the work of Will Richardson, author of RSS: A Quick Start Guide for Educators. This will be added to Education and Distance Learning Resources 2005 Internet MiniGuide. This will also be added to thr resource listing in my Bots, Blogs and News Aggregators presentation blog. This has been added to the tools section of Research Resources Subject Tracer™ Information Blog.

php|architect News Feed Now Available


php|architect News Feed Now Available 12/09/2002 04:09 AM
php|architect, the new monthly magazine for PHP professionals, has added an RSS news feed to its website that can be used pull the news items published through php|a.

Web news feed syncs up with ads


Web news feed syncs up with ads 09/24/2004 03:24 PM
Moverover opens up its news aggregation software to the public for free--but the headlines will be delivered with ads.

NewzAlert.com for all your RSS and XML
news feed needs.


NewzAlert.com for all your RSS and XML
news feed needs.
07/08/2004 02:22 AM
Castle Software announces the launch of the NewzAlert.com RSS portal, located at http://www.NewzAlert.com on the web. NewzAlert.com is a portal, with a Google PageRank of 6, that brings together all aspects of RSS and is an evolutionary step in the world of RSS. From RSS feeds organized by category through tools for creating and publishing feeds to tools for viewing RSS feeds, NewzAlert.com offers it all in an easy, professional and stylish interface. [PRWEB Jul 8, 2004]

Geek News Feedburner Feed No More!


Geek News Feedburner Feed No More! 04/06/2005 02:34 AM

I have made regular announcements that we were going to be dropping our FeedBurner feed. If you are one of the 300 or so that still had your RSS aggregator pointed at the feed it is no more. We want all of you to make sure you utilize this link.

http://www.geeknewscentral.com/index.xml

We apologize for this but we did not feel comfortable of allowing them to collect stats on all of you. The above link remains the primary feed for Geek News Central. If you want the podcast only feeds here is the links to those feeds.

http://www.geeknewscentral.com/podcast.xml (MP3)
http://www.geeknewscentral.com/wma.xml (WMA)
http://www.geeknewscentral.com/ogg.xml (OGG)
http://www.geeknewscentral.com/torrent.xml (.torrent)

For those wanting to pick up the feed off of our Link Blog use the following URL

http://www.geeknewscentral.com/linkblog/index.xml


EE News Feed - Chewie, Look Out For
Mynocks!


EE News Feed - Chewie, Look Out For
Mynocks!
03/13/2003 12:52 PM
Star Wars Saga / Star Wars Episode II - Attack of the Clones Collection 1 Figure Assortment, Wave 10 (Item# HS84851L, $64.99). This new action figure assortment includes: Han Solo - Hoth (NEW), Chewbacca - Mynock Hunt (NEW), Destroyer Droid - Geonosis Battle, Mace Windu - Arena Confrontation, Boba Fett - Pit of Carkoon, R2-D2 - Droid Factory Flight, Anakin Skywalker - Secret Ceremony, and Obi-Wan - Acklay Battle.

UC Berkeley News Center gets an RSS feed


UC Berkeley News Center gets an RSS feed 04/09/2004 04:01 PM
For the first five years I lived in Berkeley, I might as well have lived in Turlock for all the contact I had with UC Berkeley. I lived my life in the tunnel zone of work, home and parenting, familiar to all working parents of small children. But last year, between fewer demands on the work front and the maturation of the youngest progeny, I finally emerged from that long tunnel, and resolved to begin making use of some of the resources available to me as someone who lives a mile away from the UC Berkeley campus. I began to attend seminars, took the progeny to Cal Day (highly recommended), and went and heard some of the many speakers who come to Cal every year (and wrote up my impressions of some of them). I have friends who teach at UC Berkeley, and they tell me that it is a very feudal organization, and each department is a fiefdom unto itself. My experience as a virtual and actual visitor certainly bears (pun intended) that out. It is as true when it comes to putting on events as everything else. Departments bring in speakers with national and international reputations, from fields as different as medicine, journalism, and business, but all too often they are only publicized by flyers and word of mouth within those departments. I started trying to make a habit of checking the online calendars for the Journalism School, the Hass School of Business, the Goldman School of Public Policy, Boalt Law School, and the School of Public Health on a regular basis to scope out upcoming events. One quick survey of the calendars confirmed the feudal nature of the institution -- each department's calendar is created with a different vendor's tool and uses a different format, and the frequently and accuracy of updates varies widely. I couldn't even find anything that looked like a useful calender on the totally lame website of the department closest to my professional interests, that of the Electrical Engineering and Computer Science department. In spite of my best intentions, I didn't check the calendars that frequently, and all too often I would only find out about a speaker or interesting conference after it happened. Then I discovered UC Berkeley's Critic's Choice Calendar, which does a reasonable job of publicizing events on campus likely to be of wide interest. I decided to put together...

BBC NEWS | Help | RSS | RSS Feed (Really
Simple Syndication)


BBC NEWS | Help | RSS | RSS Feed (Really
Simple Syndication)
01/19/2004 06:13 AM
BBC NEWS Help RSS RSS Feed (Really Simple Syndication)

news.bbc.co.uk/1/hi/help/3223484.stm
track this site | 4 links


PulpFiction news feed aggregator
released


PulpFiction news feed aggregator
released
05/17/2004 10:34 AM
Freshly Squeezed Software today announced the release of PulpFiction 1.0, a new Mac OS X news feed reader and aggregator...

iSpeak It 1.6 adds RSS/XML news feed
ability, more


iSpeak It 1.6 adds RSS/XML news feed
ability, more
05/19/2004 05:53 AM
iSpeak It 1.6 is the latest version of the US$12.95 utility that allows you to take any document or Web page and convert it into an MP3 or AAC track in iTunes using your Mac's built-in text-to-speech capabilities...

Celebrity News premium feed added


Celebrity News premium feed added 09/02/2004 05:47 PM

Matt Damon's Uncle swims the Channel! Celebrity News Service has been added as a premium content partner to NewsGator Online Services, and their first feed is now online. The new feed provides the latest news and gossip about "A-list" celebrities...so never again will you be the last to know about what Paris or Britney is up to. Check it out!

Subscribers can find the new feed in the Prem ium Content catalog.


NewsMac 3.1 RSS news feed reader
released


NewsMac 3.1 RSS news feed reader
released
07/06/2004 03:32 AM
ThinkMac Software today announced the release of NewsMac 3.1, the latest version of the company's RSS news feed reader for Mac OS X...

Alternate News Feed Supporters Stick
with IETF


Alternate News Feed Supporters Stick
with IETF
07/16/2004 06:56 PM
Backers of Atom, a rival XML syndication format to RSS, decide against a switch to the W3C as the IETF gives its blessing to start Web standards work.

Digital Cameras, New Services Offered
News Feed


Digital Cameras, New Services Offered
News Feed
04/08/2005 05:17 AM
New services offered by www.bargainfindsonebay.com including FAQ's and News Feed. [PRWEB Apr 8, 2005]

NewsIsFree: Your own Advanced News
Reader and Feed Publisher


NewsIsFree: Your own Advanced News
Reader and Feed Publisher
05/31/2004 11:39 PM
Read news from thousands of news sources updated every 15 minutes on the most powerful news aggregator.
Create custom feeds with more items, descriptions, select your version of RSS...
Check out NewsIsFree's services!

News: UN game teaches kids to feed the
hungry


News: UN game teaches kids to feed the
hungry
04/18/2005 10:13 AM
The UN World Food Programme (WFP) has released a game called Food Force. Available for download for free, the game is compatible with Macs and PCs. The WFP's goal in releasing Food Force is to educate players about world hunger and the work the aid agency does.

Iraq news feed draws criticism; Local
broadcasters slam Pentagon plan 12/20


Iraq news feed draws criticism; Local
broadcasters slam Pentagon plan 12/20
12/20/2003 06:22 AM
What? You Don't Like Propaganda? .. here we go .. Boston Globe

boston.com/news/nation/articles/2003/12/19/iraq_news_feed_draw s_criticism
track this site | 6 links


"Feed Your Reader" Firefox Feed
Extension


"Feed Your Reader" Firefox Feed
Extension
09/20/2004 10:22 AM

When Firefox add ed RSS support, I had mixed reactions. On the one hand, I was excited by the boost RSS would receive by being supported in a popular browser. But on the other hand, for obvious reasons I wasn't wild about how Firefox built RSS into the browser without enabling users to choose an external RSS reader.

So, I was glad when several FeedDemon customers talking about building an extension to enable FeedDemon to take advantage of the new Firefox RSS features.

Michael Koziarski rose to the challenge and created F eed Your Reader, a Firefox extension that enables you to subscribe to feed in FeedDemon - or any other RSS reader that supports the feed: // protocol. Which means that even though the extension was designed with FeedDemon in mind, it's not specific to FeedDemon. Initial tests show that it also works with NetNewsWire on the Mac.

Once this extension is installed, you'll see an additional "FYR" icon in Firefox's status bar right next to the existing RSS icon. Clicking the FYR icon displays a menu of auto-discovered feeds, and clicking one of these feeds will display FeedDemon's "New Channel" wizard to subscribe to it.

Details on Feed Your Reader are h ere, and the project page is here. If you're viewing this in Firefox, the download link to the XPI (extension) is here .


AnimalAttraction.com, An Online Dating
Site for Pet Lovers, to Distribute Free
Video News Release Via C-band Satellite
Feed on September 24 & 25


AnimalAttraction.com, An Online Dating
Site for Pet Lovers, to Distribute Free
Video News Release Via C-band Satellite
Feed on September 24 & 25
08/23/2004 02:49 AM
AnimalAttracion.com is an online dating site targeting the 40 million single pet owners in the U.S. and millions more singles who don’t own pets, but love them just the same. The company is making available to U.S. television news stations a two-part video news release about people forming connections through their passion for pets. Advance viewing of the two-part feature package is available online at http://www.animalattraction.com/press.asp [PRWEB Aug 23, 2004]

Parsing XML with Perl


Parsing XML with Perl 07/21/2002 10:36 PM
CNET Jul 21 2002 10:12PM ET

Article on Parsing RSS


Article on Parsing RSS 11/18/2002 12:58 PM
I have put up an article on how I parse RSS files. Also, in the same article I provide my RSS parser as a free download. I'd appreciate any feedback on it. The WAI compliancy will have to wait another day. One thing the Bobby accessibility validator doesn't like about my site is the links below every new post. The "permalink" and "comments" are specifically what it doesn't like. This is because the same text is repeated for each news post, although each one points to something (slightly) different. I don't want to get rid of these links, so I'm looking for a suitable (perhaps graphical) alternative.

Parsing RSS At All Costs


Parsing RSS At All Costs 01/22/2003 07:41 PM
In his second Dive into XML column, Mark Pilgrim describes his parse-at-all-costs parser of ill-formed RSS feeds, using Python's sgmllib.

More XML: Parsing with Evolt.org


More XML: Parsing with Evolt.org 08/14/2002 08:16 AM

Parsing OWL in RDF/XML Published


Parsing OWL in RDF/XML Published 01/22/2004 03:25 AM
2004-01-21: The Web Ontology Working Group has released Parsing OWL in RDF/XML as a Working Group Note. The OWL language is used to publish and share sets of terms called ontologies, supporting advanced Web search, software agents and knowledge management. This document describes a strategy for OWL-RDF parsers. Read about the Semantic Web. (News archive)

Pull Parsing in C# and Java


Pull Parsing in C# and Java 05/23/2002 10:39 PM

Python parsing module


Python parsing module 12/18/2003 01:00 PM
pyParsing Python library - version 1.0.1 released

dtddoc step 1: Parsing a DTD


dtddoc step 1: Parsing a DTD 10/02/2002 09:35 AM
Our quest to build a better automatic DTD documentation tool begins with a quick look at some of the available DTD parsers for Java, Perl, and PHP. By Michael Classen. 1002

RSS native parsing in the next Firebird


RSS native parsing in the next Firebird 02/10/2004 02:42 AM

This is new to me. I was checking out the nightly builds of Firebird 0.8 betas (windows and linux, mac< /a>) and they' ve got an rss button and panel that parses RSS, with titles linking to the main window. Slick, but they need to let you track which ones have new/old items.

update: It turns out I'm actually a dumbass. I installed this RSS extension so long ago I forgot about it, and because I never saw it show up in any menu, I figured it never "took" on my Firebird install. Then when I had the new nightly build the toolbars were out of whack on first run so I went to customize them and saw the RSS button for the first time, and assumed it came with Firebird 0.8. My bad.


Independently Parsing Perl


Independently Parsing Perl 06/17/2005 04:30 PM
Stodgy, boring languages have great editors. What's keeping Perl from refactoring support, perfect syntax highlighting, and other advanced transformation techniques? It's really difficult to parse Perl. Fortunately, Adam Kennedy's PPI project provides a standalone Perl parser that operates correctly on all but 28 of the 38,000 CPAN modules. Here's how it works and what you can do with it.

Features: Non-Extractive Parsing for XML


Features: Non-Extractive Parsing for XML 05/19/2004 07:15 PM
Changing the way XML parsers are written can make parsing more efficient and more flexible.

Simple XML parsing with SAX and DOM
(OnJava.com)


Simple XML parsing with SAX and DOM
(OnJava.com)
07/01/2002 08:28 AM

BitFlux Blog: Parsing Bad XML in PHP 5.1


BitFlux Blog: Parsing Bad XML in PHP 5.1 08/19/2004 10:10 AM
In a new note from the BitFlux blog, Christian Stocker has information about the latest patch comitted to the PHP 5.1 branch that allows you to parse not well-formed XML documents and adds the missing elements, eg. missing closing tags.

Functional XML Parsing Framework 5.1


Functional XML Parsing Framework 5.1 09/16/2004 09:22 PM
SAX/DOM/SXML parsers with support for XML namespaces and validation.

Parsing a Querystring With Perl


Parsing a Querystring With Perl 12/19/2002 07:40 PM
Stickysauce Dec 19 2002 6:46PM ET

High Speed XML Parsing is Not Intuitive


High Speed XML Parsing is Not Intuitive 02/11/2004 03:58 AM
For a PHP weblog, there haven't been many PHP articles or links recently. This is because I feel most recent PHP articles I read have nothing fresh to say, repeating material I linked to 2 or 3 years ago. Perhaps I'm getting jaded. So to keep things fresh, here's a new article, mostly original, and hopefully of some interest to everyone!

Last year, Tim Bray, one of the co-authors of the XML spec, mentioned that he used Perl regular expressions to parse XML.

Now here's the dirty secret; most of it is machine-generated XML, and in most cases, I use the perl regexp engine to read and process it.

I was struck by this because I would have thought XPath or SAX would provide better performance as they are APIs tuned specifically for XML.

I decided to do some benchmarks to determine which techniques were better. I also wanted a realistic test, so I benchmarked parsing the RSS feed of this web-site, searching for the contents of all title tags, and returning the contents as an array. The RSS file is from Nov 2003 (yes i did this benchmark that long ago), and is about 20K and has 12 title tags, so the returned array will have 12 title strings.

The techniques used were:

1. Regular expression: preg_match_all('/<title>([^<]*)/',$rss,$titles_arr))

2. Explode('<title>', $rss) then strip the matching </title> tag using strpos() and substr().

3. XPath, using $title_nodes = $ctx->xpath_eval("//title");

4. SAX, wrote an element handler function that matched and processed the title tag.

5. DOM, using $titles = $dom->get_elements_by_tagname('title'). Intuitively, this should have been the slowest, as the whole tree is generated.

Results

Here are the timings for processing the RSS file 1000 times. Faster is better.

            seconds       Relative 
                          to REGEX
REGEX       0.1080          1.00
EXPLODE     0.1696          1.57
DOM         6.3212         58.53
XPATH       8.3417         77.24
SAX        10.0851         93.38

Conclusion

Intutively, I would have thought that XPath would be the fastest as XPath expressions can be compiled and tuned for XML. But the best performance was achieved using regular expressions, which is what Tim is using.

It appears that the DOM, SAX and XPath libraries remain immature (compared to the Perl-compatible regex library) and are not highly optimized. Strangely enough, DOM performance is better than XPath and SAX! Perhaps someone else can explain why.

If anyone is interested, i can post the source.

Test platform: Windows 2000, PHP 4.3.3. I also tested on Linux, PHP 4.3.2, with similar results.


Warcraft III Replay Parsing Library


Warcraft III Replay Parsing Library 08/09/2004 11:30 AM
W3RepLib 0.9 beta released!

The State of the Union Parsing Tool


The State of the Union Parsing Tool 02/05/2005 09:55 PM

style.org/stateoftheunion/parse
track this site | 3 links


Grok Description matches for Parsing the News.com RSS feed with PHP
GrokA matches for Parsing the News.com RSS feed with PHP

Parsing the News.com RSS feed with PHP

The following phrases have been identified by the grok system as matching this entry:

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Improve your
technique: Take
advantage of
JavaScript coding
guidelines

Create a file upload
feature with C#

Winners of Builder's
2nd Annual Readers'
Choice Awards

Australian Pilot
Stranded In
Antarctica

AOL Instant
Messenger for
Windows v5.5.3501
Beta

Total Remote Control
Of Your House With
New Script Sets

Smile 2.5.9 Released
for Mac OS X

Security Engineers,
VA

Gavin Newsom won
UK spam ban comes
into force

Mainland, Hong Kong
and Macao discuss
intellectual
property

Solving The Online
Music Format Mess...
With Another Format?

Catching Light In A
Bottle

Get ready for HDMI
By your command
Report: AT&T to
offer Internet
calling

Vintage Photo
Archives: Nien Nunb

eBay Today: Jeff
Gordon Pepsi Car

Sovereign
Semiconductor

Sony to unwrap the
PlayStation Potable
in May

Mobile Games Go From
Pong To Quake In 18
Months

Calif. City Making
Wireless Web Access

Briefly: Sharp puts
Word files on phones

Physicists 'store'
pulses of light, see
computer uses

Report: AT&T Plans
Internet Voice
Service

AT&T Joins Fray for
Cheaper Calls
Through the Web

Global trade, global
warming

Coal mining's flunky
Didn't ask for it?
Don't open it

Copyright litigation
threatens innovation

Air Force negotiator
aided Boeing,
e-mails suggest

Qwest begins phone
service over the Net
in Minnesota

Calif. city making
wireless web access

Defense: Accused
Cuba Hijackers Eyed
U.S

Judge Cuts Ark.
Ex-Governor's Back
Taxes

Court Rules for
Tobacco Companies in
Suit

Salvadorans Sue
Ex-Commander in
Memphis

Philip Morris
Appeals $10.1B
Verdict

Seoul Analyzing
Reports of N.Korea
Nuclear Activity

More Flu Cases in
Colorado, But May Be
Peaking

Feds Fine Freddie
Mac $125 Million

N.Korea Atomic Moves
Reported as Allies
Seek Talks

Rumsfeld Seeks Intel
on Insurgents

U.N. Meeting Debates
Software for Poor
Nations

AT&T Joins Fray for
Cheaper Calls
Through the Internet

Silicon Laboratories
Completes
Acquisition Of
Cygnal Integrated
Products

Mt. Rainier
JDraw 1.1beta (For
JDK 1.4)

MythTV 0.13
New Photos and
Details on the
DoCoMo FingerWhisper
Phone

what is grok?