In this article we take a look at the PHP tokenizer and its potential at analyzing and processing PHP source code. We will build several working examples, which you can start using and extending for your own purposes.
Other tags:
homepage
php
tokenizer
If you want user interaction on your website then you probably accept the upload of some media, including images. Within PHP there are two different libraries available that provide functionality for handling images, GD and the Imagick extension. This article takes a brief look at each of these libraries.
Other tags:
gd
homepage
images
imagick
pecl
php
A common task for any authentication system is to store and retrieve passwords. Doing this securely is key to building a system that is not only stable, but relatively safe in the event that it ever becomes unstable and allows potential attackers to view stored account information. Passwords should never (or rarely) be stored as plaintext: this is where one-way cryptographic hashing can save the day—or at least save plenty of difficult work.
Other tags:
hashing
homepage
security
Opcode caches save energy, expenses, improve overall user experience on web sites, and it's often one of the simplest optimizations to implement. This article will explain the basics of installing, configuring, and tuning an opcode cache for PHP, the Alternative PHP Cache (APC).
Other tags:
apc
homepage
performance
php
In the previous article in this series, we learned how the CakePHP routing system handles URLs and interacts with your application in order to dispatch requests to the proper controller action. In the first article of the series, we saw how the Router's features could be combined with other classes in the framework (the , for example) to enable things like unifying the handling of different resource types.We're going to take these concepts further and add a new one: REST.
Other tags:
cake
cakephp
homepage
rest
web services
The precursor to this article introduced some background and an overview of the design for the Phergie project as an example of the concepts involved in a PHP IRC bot implementation. This article will go further into the topic of plugins including descriptions of those that are commonly needed to make a bot fully functional as well as the commonly needed core features to support plugin development.
Other tags:
bot
homepage
irc
php
If you've ever perused the internet in search of an article or reference on writing an IRC bot in PHP, you were likely disappointed. Most such documents are outdated to the point that their examples are based on PHP 4 and its socket functions. Few show more than the most trivial of bot implementations and barely touch the tip of the iceberg where the IRC protocol is concerned. This article is intended to help remedy that situation.
Other tags:
bot
homepage
irc
php
Using CakePHP's advancing routing system, you can easily create advanced, custom, SEO-friendly URLs with minimal configuration.
Other tags:
cake
cakephp
homepage
mvc
SEO
No, foreign keys aren't from Brazil or Italy or even the US. Though they can be a bit strange to those who do not understand them, have no fear. We are here to teach you how to talk to them so they can serve your whims.
Other tags:
databases
foreign keys
homepage
mysql
php
Building PHP on Windows doesn't have to be a time intensive mystery. Whether you're building custom extensions, patching something in the PHP core, or want to try a build on a newer compiler, you don't have to be intimidated by warnings and errors. Compiling on Windows is no more difficult than compiling on any other system as long as you have the requirements needed: the php source code, a compile environment that the source code understands, and any library dependencies.
Other tags:
compiling
fastcgi
homepage
php
windows
With MVC frameworks being the fad of the land these days, you're probably familiar with the MVC pattern, and the generalities of how it works. Maybe you've even written an app or two in one such framework. However, it's common for PHP developers to apply typical PHP practices, such as page-oriented design, even when working with MVC, prohibiting them from utilizing the pattern to its fullest potential.
Other tags:
cake
design patterns
homepage
mvc
Contrary to popular belief, PHP on Windows is not an oxymoron. The decision to use Microsoft Windows systems as the host for a server operating system, usually a decision made by someone else, doesn't have to send you running for the latest ASP.NET book. PHP runs great on Windows, whether you have legacy applications already running on PHP or intend to write new applications without learning a new language you shouldn't need those anti-anxiety medications. You just need to understand some basics of Windows and how PHP interacts with it.
Other tags:
fastcgi
homepage
iis
php
windows
In this article, we look at the ability of PHP code to inspect itself, using the Reflection API introduced with PHP 5. We will build a tool that lets us automatically convert any class to a fully functional REST service, without writing a single line of dedicated binding code.
Other tags:
homepage
php5
reflection
rest
Inspekt is a library for PHP4 and PHP5 that aims to make safe input handing easier, and unsafe actions more difficult. Inspekt establishes a new development approach by wrapping input within “cage” objects, and requiring the developer to use validation and filtering methods to test and manipulate the input data. This article provides a brief introduction to Inspekt and its capabilities.
Other tags:
homepage
inspekt
security
Late Static Binding (LSB) is a topic that's been brought up numerous times in the past three years in various PHP development discussion circles (and we're finally getting it in PHP 5.3)—but what does it really do, and why should you care? Here's a simple practical example of how it can greatly simplify your code's design.
Other tags:
homepage
late static bindings
lsb
PHP 5.3
JavaScript validation has been around for years, but is often poorly implemented. Done correctly client side validation can improve the overall user experience as well as save unnecessary page requests.
Other tags:
client side validation
homepage
javascript
validation
There are many frameworks available for the PHP programming language nowadays, and especially a lot of which aim to make web development faster, less tedious and more organized. CakePHP was one of the first frameworks to port the RAD philosophy - which became so popular after - to the PHP programming language.
CakePHP v1.0 is now one of the most popular and intuitive solutions for PHP programming, let's discover why...
Other tags:
cake
cakephp
-
Other tag:
exit(0)
-
There are different reasons for logging information, different strategies for what and how to log, and of course different ways of implementing it. This article will look at why you would want to log, what you want to log and how to do it.
In the last decade, PHP has developed from a niche language for adding dynamic functionality to small websites to a powerful tool making strong inroads into large-scale, business-critical Web systems. Financial institutions such as banks and insurance companies use PHP, for instance, to develop and maintain solutions for Basel II Credit Rating. Critical business logic like this needs to work correctly. But how do you ensure that it does? You test it, of course.
Other tags:
phpunit
unit testing
unit tests
Now that we've become familiar with the fundamentals of stored procedures it is time to start playing with the “Big Boy Toys”. This article will go over stored procedures's built in error handling, the security features available, various “extras” available, what isn't allowed in a stored procedure, and some basic administration of the stored procedures. So lets stop talking and bust open the toy box and start playing!
Other tags:
mysql
stored procedures
In this article I describe how to use Zend framework components in a CakePHP application by means of building a very simple CakePHP application using Zend_Service_Flickr, a component for accessing the Flickr web services.
Other tags:
cake
cakephp
zend framework
zf
The Solar library and application framework can make your development efforts faster, easier, more secure, and more structurally predictable. This article, by Solar's creator Paul M. Jones, talks about the foundational concepts underpinning the technical aspects of the Solar project.
Other tags:
framework
solar
It is fairly self-evident how to use most of the magic methods of PHP 5.
However, it is not quite so apparent how to use the __set_state method introduced in PHP 5.1.
In this article, Peter lavin delves into this elusive magic method to
show you how to use this gem in some really 'classy' object oriented PHP.
Other tags:
magic
php5
Ah, hindsight: like foresight, but without a future! I hate articles that being with “in hindsight...” on principle, but it's sometimes useful to take a look at the past to map out a better future.
Other tag:
exit(0)
As a developer, you know enough about your code to do anything you want. Others are having a much harder time getting your software to run. Time for some support. But how to approach this? This article will look into that.
Other tags:
community
oss
project management
With the release of MySQL5 a bold new world opens up to the PHP developer... the world of a database programmer. In this world the interaction with the data can be done right where the data is located - not in a script that is far far away in a distant server. In this article we will be taking you on a journey that will introduce you to MySQL's stored procedures.
Other tags:
mysql
stored procedures
In a recent post to a blog that was reported in our news, author Cliff Wells claims that the light has gone out on LAMP. I have addressed enough of these articles in the past–as have many others who know a log more about technology than I do–and I am not really going to address another one here. In fact, I am only going to use it for that most human of human forms of expression: imitation.
Other tag:
exit(0)
One of PHP5's landmark new features is the inclusion of a library of SOAP functions that make it easy to interact with SOAP based web services. While these functions are very powerful, learning to use them the first time can be a little intimidating. The goal of this article is to introduce you to PHP5's basic SOAP functions and how they are used through a working example.
Other tags:
soap
web services
One of the hardest parts about getting started with PHP-GTK is understanding how to properly layout the user interface. It can be very frustrating to finally get an application laid out just right, only to see it horribly disfigured when the user expands or shrinks the window. Part III of this series focuses on how to manage the relationships between parents and children in such a way that the application behaves well no matter what the user does to the window.
Other tags:
gui
php-gtk
The PEAR Installer has been capable of packaging and distributing real applications, as well as the traditional PEAR library components, since version 1.4.0. This article demonstrates how to use exciting new feature—such as post install scripts—when using the Installer to distribute custom applications.
Other tag:
pear
The PEAR Installer has been capable of packaging and distributing real applications, as well as the traditional PEAR library components, since version 1.4.0. This article demonstrates how to use exciting new features—such as post install scripts—when using the Installer to dis-tribute custom applications.
Other tag:
pear
AJAX and PHP give developers the perfect platform for creating interactive tools that allow users to perform non-critical tasks without having to reload a page. In this article, Marco Tabini illustrates how you can create a cool-looking rating system for virtually any web page with nothing more than a handful of PHP, a touch of Javascript and a couple of images.
Other tag:
ajax
-
Since the beginning of Internet time man has strived for the best way to send emails from a program. Whether a web page that notifies its owner when an order is placed to merchants sending a welcomed message to its closest 250,000 customers; man continues to strive for the best way to communicate without having to be personal. With the advent of the Zend Framework, we have another weapon in the arsenal, Zend_Mail.
Part I of this PHP-GTK series looked at what PHP-GTK is and why you might want to use it. The next installment, “Hello PHP-GTK 2”, gets down to business with the requisite “Hello World” application. This article attempts to go a little deeper than just showing the code to get it working. Instead the article talks about how each line of the application interacts with the others, giving a better picture of the process of building a PHP-GTK application.
Other tags:
gui
php-gtk
In the last article, I showed you how to develop a simple Flex application that connected to a PHP backend. As you were going through it, you were probably thinking - Is there anyway to pass variables directly from PHP, rather than having to encode them into XML? The answer is yes, and today I'm going to show you how to do that.
Other tags:
flash
flex
ria
web 2.0
Everyone knows that PHP is a powerful tool for building dynamic web sites, but not everyone understands the true potential of PHP on the desktop. In part one of this series on PHP-GTK, we will look at the evolution of PHP-GTK and explain why it is sometimes preferable to develop applications for the desktop rather than the Web.
Other tags:
gui
php-gtk
The development of Rich Internet Applications is now underway. Some people call it Web 2.0, but it is really the transition from a page based browsing experience to one that more closely resembles desktop applications. A variety of technologies can be used to deliver this experience; AJAX is one of the more popular sets of technologies, mainly because it can be easily adapted into existing web based applications. However, for those who are looking for something more robust, there appears to be 2 early front runners: Flex based applications that run in the Flash player from Adobe, and XAML based applications from Microsoft. In this article, I'll introduce you to Adobe's Flex product line, including Adobe Flex Builder and Adobe Flex Enterprise Services.
Other tags:
flash
flex
ria
web 2.0
In the midst of all the wonderful AJAX libraries in the wild, many today still don't understand the underlying technologies of AJAX that make it so powerful. In this article php|architect's publisher Marco Tabini covers JSON, the magic format that makes serializing data between Javascript and other languages (often server-side) a breeze. Simplicity, velocity and power are the gifts of JSON.
Other tags:
ajax
json
-
We asked PHP security expert — and contributor to the newly-released Zend Framework — Chris Shiflett to write an article for us on the ZF's major features, and he came through with style!This complete, step-by-step tutorial provides an exclusive first look at building a practical application with the framework by showing you how to write a simple news management system.