Character Encoding Help

Tom Morris is pulling his hair out dealing with XML character encoding issues. I’ve gone through this myself. I found that the SimplePie feed parser has great logic for dealing with this, so I adapted it to my needs in my PHP class XMLParseIntoArray. I think I’ve expanded on SimplePie’s approach a bit, but it’s… Continue reading Character Encoding Help

PHP command line mode detection

Use a block like this in PHP code to detect whether or not it’s running in command line mode as opposed to web server script mode. // if $_ENV['SHELL'] exists, we're probably in command line mode if (array_key_exists('SHELL', $_ENV)) { $this->setOutputMode(MYSQLICIOUS_OUTPUT_CMD); } else { $this->setOutputMode(MYSQLICIOUS_OUTPUT_HTML); }

Leash and Feedparser

Maybe I’ll write up something a little more formal in the future. For now, I just want to publish this in case it’s useful to someone. Les Orchard posted a blurb that indicated that he was looking for a PHP class to perform HTTP requests with conditional GET support. Well, a while ago I was… Continue reading Leash and Feedparser

BlackBerry Browser User Agent

FYI: My BlackBerry’s Web browser identifies itself (i.e., “User Agent”) as: BlackBerry8700/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 So in PHP, an inexpensive check would be something like: if ( 0 === stripos($useragent, ‘blackberry’) ) { echo “True”; }

Resolution of trouble with CentOS 4 + PHP 5.1 + Zend Optimizer

I have a server running CentOS 4.4 updated with the PHP 5.1.6 from the testing repository. When I tried to install Zend Optimizer 3.0.2, I ran into this problem: Failed loading [path]/ZendOptimizer. so: [path]/ZendOptimizer. so: undefined symbol: match Then, when I tried to downgrade and install Zend Optimizer 3.0.1, I ran into this problem: Failed… Continue reading Resolution of trouble with CentOS 4 + PHP 5.1 + Zend Optimizer

Published
Categorized as post Tagged ,

A River for NewsGator

Truly re-inspired by Dave’s injection of interest into mobile news reading, I’ve been tinkering with my own custom solution. Since I subscribe to NewsGator, I’m using the NewsGator API for some backend, but I’ve done quite a bit of plumbing myself. The most important things I wanted to be able to do were (1) to… Continue reading A River for NewsGator

Optimal Bugfix

I released a bugfix for Optimal today. The latest version is 0.4c. If you haven’t experienced any weird problems with the 0.4 release, don’t bother updating. Thanks to Chris Pirillo for bringing the problem to my attention and working through it with me.

Optimal OPML Browser Update v. 0.4

I’ve completed a major rewrite of my OPML browser, Optimal. I didn’t manage to document all of the changes, they were so numerous. Highlights are: Object-oriented reimplementation, making it more portable to other applications Same code may be used as a WordPress plugin — replaces the OPML Renderer plugin for WordPress RSS items now include… Continue reading Optimal OPML Browser Update v. 0.4

Optimal OPML Browser Update v. 0.4pre1

I’m still working on a significant rewrite of my OPML browser, Optimal, but I’ve decided to release the current working version in the meantime because it addresses a couple of significant usability comments I’ve had. Specifically: There are now links to expand/collapse all nodes, and There is a new query string parameter, depth, which allows… Continue reading Optimal OPML Browser Update v. 0.4pre1

Del.icio.us to OPML + Mash

I’ve still got some work to do, so this is just a “hey, it works” sort of post. John Tropea posted last week about an OPML hack for del.icio.us to which I responded with a more dynamic example and to which another reader asked, “Why bother?” Fair enough quesiton, and here’s a better answer by… Continue reading Del.icio.us to OPML + Mash