Skip to main content
I'm streaming on Twitch right now. You should stop by. Let's go!

Tagged: php

  • Browsercache.php: A simple browser-cache-handling library for CodeIgniter


    While CodeIgniter provides a disk caching mechanism, it lacks a browser caching mechanism. Without a lengthy introduction, here's one. …

  • Add "desktop version" and "mark all as read" links to Tiny Tiny RSS mobile plugin


    I installed Tiny Tiny RSS on a server of mine, and after tinkering around with it for a little while, I turned on the built-in mobile plugin. It's a wonderful little thing; it uses the iUI library to present a slick, single page application; it strips images out of the article bodies; and it automatically forwards you to the mobile version when you view TTRSS on your phone. I have just one problem with it—there is no way to mark articles as read in bulk from the interface… so I added some tweaks. …

  • WordPress plugin minify Makefile


    While working on my first commercial WordPress plugin, the need for build automation finally struck me. The environments in which I do my most development are all driven by Linux, and so I wanted to use a tried, true, and ubiquitous build automation mechanism to fulfill my need. As such, I wound up going with a Makefile, to be parsed and executed by the GNU make application. The result is an incredibly convenient automated build that minifies my Javascript/CSS (thanks to reducisaurus), and creates a version-appropriate archive of my plugin. …

  • Add password maintenance feature to cgit with PHP


    Have you ever wanted to have a nifty, browser-driven password maintenance feature in your htpasswd-secured cgit site? I've been meaning to build this for a while—and I finally did it. …

  • Using cURL for parallel PHP without pcntl_fork


    So, you want to do some parallel processing in PHP (alliteration FTW!), but your service provider does not grant you access to the pcntl family of functions*. What do you do? If you're in a *nix environment with access to the curl command line application, then you get creative. …

  • What's My Status v1.2 released


    My WordPress microblog feed widget recently went through another update. This time around, I've added the ability to filter out replies and re-posts ("retweets" in Twitter lingo, "redents" in identi.ca speak) from your activity feed. Pick up the new version from the WordPress …

  • What's My Status? v1.1 released


    My microblogging feed widget for WordPress, What's My Status?, has been updated. The plugin now uses curl for its main retrieval mechanism, with standard URL fopen as the fallback. Additionally, the Reset cache command has been fixed. You can grab the plugin for yourself over at the wordpress.org …

  • Selective backup/copy script for moving files into production


    Whenever our web site needs to undergo re-branding, there is always the hassle of creating both the selective package of files to move into production from development and the selective back-up of the necessary files already on the production server. While this is not a soul-crushingly elaborate and tedious task, it still takes time that could be better spent elsewhere in the project. With this in mind, I created a simple PHP script that will mirror the directory structure and only those files that will be changed in the process as it copies the files from development into production. …

  • Create anchor links in Twitter status text with PHP


    In a previous blog post, I outlined how to convert Twitter @mentions, #hashtags, and URLs (with or without protocol prefixes) into anchor links using JavaScript. Here is that same process wrapped up in a PHP function instead for your server-side needs. …

  • What's My Status? v1.0.0 released


    My first officially-recognized WordPress widget, What's My Status?, has been released! It is a widget for displaying a given user's status feed from identi.ca, Twitter, or any other service that provides a Twitter-like API. There are several features in the works for future versions—such as inclusion and exclusion filters—but at its core, it is a simple, effective status feed widget that will intelligently convert @mentions, #hashtags, and URLs alike into clickable links. It is also prepared to cache the feed results, so it shouldn't step on anyone's toes with regard to API access limits. …

  • Help! I can't delete phpMyAdmin's setup.php


    I've got a VPS server running Debian 5 "lenny" and recently attempted to perform several software upgrades to bring it up to speed (it had been longer than I care to admit). However, the upgrade for the phpMyAdmin package continually failed, stating that it was unable to remove /usr/share/phpmyadmin/scripts/setup.php. The file had apparently been given the file permissions mask of "000", which essentially denies any sort of action being taken against the file. "No problem," I thought, "I'll just chmod it to allow deletion and be on my merry way!" Well... it was a problem. …

  • Fix CodeIgniter IP address detection on lighttpd


    If the results of a call to $this->input->ip_address() gives you "0.0.0.0" (the "invalid address" response) and you're running lighttpd as your web server, you may be able to fix it with a minor tweak to by extending one of the base CodeIgniter libraries. An IPv6-style header is being appended to the IPv4 address, most likely, and stripping it out before CodeIgniter considers the validity of your address should restore functionality without circumventing any of the logic. …

  • URL rewriting template engine


    My employer is currently in the process of standing-up a content management system (CMS). In the process of migrating links on our existing site to the new CMS site, there are going to be—at least, at first—a metric tonne of possible URL redirects necessary. Since the majority of these will fall into a handful of categories, I began creating IIRF (Ionic ISAPI Rewrite Filter) URL rewriting rules that would, for instance, move a particular list of "Offices" from /offices/officename to http://newserver/offices/officename. (Note: These directives should be compatible with Apache's mod_rewrite, and even lighttpd's url.rewrite, as well.) …

  • WebFOCUS Impact Analysis report compactor


    Here's a little script I whipped up to combine several Impact Analysis reports generated by WebFOCUS Developer Studio. The script opens HTM-formatted IA reports, skims the data, and then concatenates it all in one CSV-formatted output block. …

View all tags