How to

Entries from January 2008

Search

Twitter

    How to do stuff.

    Monday, January 28. 2008

    A Simple RSS Reader with SimpleXML

    SimpleXML is exactly that: a simple way to handle XML data (including RSS feeds) with PHP5. Today we'll look at using SimpleXML to read and display RSS 1.0 feeds. We'll start by breaking down what information exactly we want to get from our XML file.
    Continue reading "A Simple RSS Reader with SimpleXML"

    Monday, January 21. 2008

    PCRE Tester and Cheat Sheet

    Regular Expressions are an extremely powerful tool in any programmers array. Though not always the easiest nuts to crack, so to speak, they are great - when they work correctly. After a rather 'amusing' night of trying to get a complex regular expression to work, I devised a plan.

    Why not have both a PCRE Tester and Cheat Sheet on the same page? A tool that allows you to input multiple test strings to make things easier, while being able to look at all of the modifiers and syntax at the same time. The PCRE Tester and Cheat Sheet.

    In the near future, I'll also be adding the ability to run preg_replace() instead of preg_match(), and a way to load some of the Regular Expressions from my library, as well as save and add your favorites.

    Wednesday, January 9. 2008

    How to install APC in Ubuntu 7.10

    APC, or Alternative PHP Cache, is a framework for PHP to cache opcodes. Opcodes are the actual instructions that are used when PHP executes scripts. By caching these, you can usually vastly improve performance across the board for PHP based applications. This guide covers installing APC in Ubuntu 7.10 with PHP5 and Apache2.
    Continue reading "How to install APC in Ubuntu 7.10"

    Tuesday, January 8. 2008

    How to install Xdebug for PHP5 on Ubuntu 7.10

    This guide will cover how to install Xdebug for PHP5 on Ubuntu 7.10. Xdebug is not only an excellent debugger for PHP, it also has one of my favorite tools for optimizing PHP - A profiler.

    This profiler will break down your code and determine where your bottlenecks, or slow downs are to ease optimization. Combined with a program to handle cachegrind files, you can benchmark and optimize your scripts quickly and effectively.
    Continue reading "How to install Xdebug for PHP5 on Ubuntu 7.10"

    Monday, January 7. 2008

    How to install Apache, MySQL and PHP (LAMP) in Ubuntu 7.10

    This guide covers the installation of Apache, MySQL, and PHP on Ubuntu 7.10 (More commonly referred to as LAMP, or Linux Apache MySQL PHP). Optionally, you can also install phpMyAdmin as a front end for MySQL. We assume that you already have Ubuntu 7.10 running on the machine as well. That said, let's get right into it.
    Continue reading "How to install Apache, MySQL and PHP (LAMP) in Ubuntu 7.10"