session_start() "Node no longer exists" - PHP
Build a custom search engine with PHP In the Internet age, people want information packaged like fast food: served instantly, hassle-free, and in bite-size (or is that byte -size?) morsels. Indeed, to feed the impatient and hungry masses, even the most modest Web site is now expected to serve a diverse menu of fast-fact formats: RSS is your pizza guy, bringing fresh-baked data right to your door. The weblog is your local Chinese take-out, delivering your favorite spicy dish. The forum is the neighborhood potluck (or perhaps more aptly, the food fight scene in "Animal House").
Editor's note : See the follow-up article " Five more PHP design patterns " to learn about five additional design patterns that you might find useful. Design patterns were introduced to the software community in Design Patterns , by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (colloquially known as the "gang of four"). The core concept behind design patterns, presented in the introduction, was simple. Over their years of developing software, Gamma et al found certain patterns of solid design emerging, just as architects designing houses and buildings can develop templates for where a bathroom should be located or how a kitchen should be configured. Having those templates, or design patterns , means they can design better buildings more quickly. The same applies to software.
I can’t seem to reach the end of the fun stuff you can do with emerging web technologies. Today, I’m going to show you how to do something that—until the last while—has been almost unprecedented: uploading files via AJAX. Oh, sure, there have been hacks; but if you’re like me, and feel dirty every time you type iframe , you’re going to like this a lot. Uploading Files with AJAX | Nettuts+ - Vimperator
The date() function in PHP is powerful and complex. In this article, we’ll teach you how to get started. PHP is an amazing language. Getting started with dates in PHP
Implementing a Cache System in PHP in PHP If you’re a PHP developer looking for a guide that teaches you the concepts behind implementing segregated interfaces and how to utilize them, then you have come to the right place. This series of articles will show you how to define fine-grained contracts for your classes, so that they can perform only the tasks they’re responsible for. In the last installment of this series, I went through the development of a basic registry system, which was capable of using different registry classes to store, retrieve and even dump data. The most engaging aspect of this sample system was that the swappable registry classes implemented a couple of segregated interfaces in order to execute the aforementioned operations.
Deploy PHP Project From SVN Using Phing | #! code Automatic building with Phing makes deploying to a server nice and easy, and if you are using SVN as your source control system then you can easily deploy directly from your repository to your web server. To allow Phing to utilise an SVN server you must first install the VersionControl_SVN pear library. Although this is in alpha release I have used it quite a bit with no issues. The only thing is that you will need to specify the version number to pear if you want to install it, like this: To get Phing to export from an SVN repository you can use the svnexport task. The following build file sets up some parameters (for use in this task), runs a target to delete the existing export and then runs a target that exports from the SVN repository we have set up.
practical php patterns - Invisible to the eye This post is part of the Practical Php Pattern series . The behavioral pattern of the day is the Iterator pattern, which provides an abstraction over a very common process: the iteration over a collection of objects [or scalars] located in an unspecified part of the object graph. The iteration may be performed in very different concrete ways: over an array property, a collection object, an array, even a query result set. In a world of objects, Iterators maintain array-like capabilities as a non invasive facet of objects. The Client class is often totally decoupled from the actual implementations of objects and refer to an Iterator interface.
PHP Advent 2010 / Color for the Holidays 21 st Dec 2010, by Jon Bond-Caron : If part of your job involves debugging or monitoring PHP apps, you’ll most likely have used tail to check for errors in a log file. While practical, it can become tedious to identify certain types of errors or warnings. If, on average, you spend 15 minutes per day searching for problems, those minutes add up to about 91 hours per year — time you could have spent doing more interesting work! This article will look at implementing ptail , a PHP version of tail -f . We’ll introduce the libevent PECL extension to detect file changes and ANSI escape codes to add some color.
PHP Advent 2010 / Mistrust and Verify When working on a web app with coworkers or fellow volunteers, few things are more important within the group than trust. Trust among developers enables them to work confidently, eases communication between team members, and empowers each of them to make good decisions. With the actual app, however, that trust should never come easily.
PHP Advent 2010 / The Ghost of Christmas Past PHP has been around nearly as long as there has been a Web to develop for, but it evolves constantly and is a modern programming language by almost any definition. Sure, it might not suit hipsters who only enjoy bands when they can say “you probably have not heard of them; they only formed tomorrow,” but it is not your granddad’s programming language. Sadly, web development often also involves SQL, and that is your granddad’s programming language. SQL, and the stored procedure languages you are most likely to encounter, have deliberately not evolved much since the 70s and 80s. When your programming ancestors were hunting saber-toothed tigers and scratching proposed SQL syntax onto cave walls, they had some fundamentally different ideas to those behind scripting languages. If you want to write good, efficient SQL for complex problems, you are going to have to learn some of that mindset, but you can go a fair way with simple SQL by avoiding some traps.
PHP Advent 2010 / Thumbnails Many of us have had the pleasure of building a web application that requires the automated building of thumbnails from images that are uploaded at runtime. Thumbnails are hardly the stuff of Nobel laureates, but they’re an uncommon enough annoyance that implementing code to produce them seems like a fresh experience each time. The easiest way to produce thumbnails for a site is to use a pre-built library designed for that purpose. There are a few decent libraries for this, including the PHP Thumbnailer Class , which provides dead-simple ways to manipulate images. Whether used as library code, or as a plugin to other software, this type of library will often do even more than produce thumbnails; it may add watermarks and easily enable programmatic rotation of the output image. Using the PHP Thumbnailer Class to create thumbnails is simple:
Before jumping into the topic of Twitter, I have something to get off my chest. Although I'm an avid user and fan of Twitter now, when it first came out, I was a bit nonplussed by it. In fact, I may have been a bit hostile. There. Use PHP to convert Twitter to RSS
Web 2.0 promises Rich Internet Applications. But what does Rich Internet Applications mean? In general, it means adding highly responsive interactivity to a Web application. Specifically, it means widgets, Web forms, and reports that change on the page instantly without having to retrieve a new page from the server. Generate Flash movies on the fly with PHP
Ever wondered what design patterns are? In this article, I’ll explain why design patterns are important, and will provide some examples, in PHP, of when and why they should be used. What are Design Patterns? A Beginner’s Guide to Design Patterns
This weekend, I started my server migration, over to Slicehost. It went well, now I’m running on a lean ‘n mean nginx install. As I was moving my Subversion repositories, I was dreading having to move all my shell scripts, which I used to build and deploy some of my applications (outlined in this post ). I was thinking there had to be a better way, after all, Ruby has Capistrano , and though it can be used with PHP, I didn’t want to have to install Ruby, etc etc. After some searching (not much), I found Phing , which looked like exactly what I needed. Sweet! Shell scripts no more! | nabeel shahzad
Creating a Twitter OAuth Application
Preventing XSS with Content Security Policy
Page 2 - PHP: Building A Simple Password Encrypter
Dominic Sayers - RFC-compliant email address validator
PHP Creating HTML Widgets
Going instant with PHP, XML, and jQuery
PHP remote debugging with Xdebug and Eclipse PDT
Introduction to the Foursquare API
» PHPUnit Training Course for free Programming the new world: Programming your life and the net, one day at a time
Quick Tip: Loop Through Folders with PHP’s Glob()
PHP snippets to interact with Twitter - CatsWhoCode.com
PHP: Adding Behavior to a URL Class
PHP: Modeling a URL Class
Using the Digg API with PHP and PEAR
Table Of Contents - Zend Framework Book: Surviving The Deep End