The Official Blog of Patcoola

Im just a dude watching over my parents,
and trying to make cartoons and video games from home.

Projects: Twitter RSS Feed Reader [PHP]

, By Patcoola

Twitter RSS Feed Reader

This PHP 5 script was made to download my Twitter’s RSS feed and display the twits on the front-page of my blog much like status updates.

Includes basic error handling for when the feed does not load or load correctly.

This script can be used to display a given number of twits.
Example: display only two twits.
If set to display or gather only two twits then only two off the 20 twits will be collected.

Advertisement

Donate Now!

Hi there, I spend a lot of time making this blog.

It would be great if you would consider donating.


Filter none personal twits such as those that start with @, # and RT.
Example: Patcoola: @Joe oh dog, what’s up?
Example: Patcoola: #mycoworkerisweird Joe is so weird he sings WoW songs at work.
Example: Patcoola: RT @Joe: This new website is the boom!

These twits will not be displayed.

Converts text to URLs.
[ HTTP, HTTPS, FTP, WWW. ] will be converted to URLs.
Example: Patcoola: @Joe oh dog checkout this rad website. www.coolastudios.com
The URL www.coolastudios.com will be converted to a hyperlink.

Coverts Twitter tags to URLs.
[@, #] At and Hash tags will be converted to URLs.
Example: Patcoola: @Joe your dog ate my home work. #dogatemyhomework
The @Joe and #dogatemyhomework tags will be converted to twitter links.

To ensure quality of text to URL conversion I have set some filters for punctuation.
Punctuation filters currently work with @ tags.
Supported punctuation [ ., ,, !, ?, :, ; ‘ ]
Example: Patcoola: @Joe’s playing DnD.
The @Joe’s will be filtered so that Joe will be the hyperlink and not the incorrect Joe’s.

Twit Published Time formatting
Converts [Fri, 01 Oct 2010 18:12:02 +0000] into something useful.

Twit link and twit source is also gathered and can be displayed.

Final Notes:
The finished project will be displayed on the next blog theme design update.
No plans to make this project public.

 

Advertisement

Donate Now!

I don't always use the women's bathroom, but when I do, you can bet it really smells. If you like my blog, please consider donating.


 

Post Meta

Share Post

 

Comments: Write Comment

Be the first to write a comment.


Leave a Comment


All comments are reviewed before publishing. Comments must be related to the page topic, must not be spam, and must comply with the criminal code of Canada.