Tutorials and Talks Magic Quotes and PHP: Parsing Escaped Data

Tom McFarlin writes - As far as building projects on or for WordPress is concerned, one of the things that we have to keep in mind is the minimum version of PHP required to run WordPress itself. At the time of this writing, the minimum required version is 5.2.4. Of course, if you know your project is going to run on a newer version of PHP and you have control over that environment, then obviously you have the freedom to write code against that version; however, if you’re building something that’s going to be used across the board for any of the many hosting environments, then you’ve got to take that into consideration.



10 Cool Things You Can Do With Your functions.php Files

Many designers don’t use it much because it is more intimidating in terms of code, but the functions.php file might just be the most powerful theme file in WordPress. Let’s take a look at some of the possibilities it offers.



Building a Sensor Phalanx with PHP

Sensors are fun. They report from the physical world into the digital. But getting the signal into php is only the first part, you will have to get them out again. This post shows how to get data from analog sensors pushed to the browser.



Authentication With Laravel 4

Authentication is required for virtually any type of web application. In this tutorial, I’d like to show you how you can go about creating a small authentication application using Laravel 4. We’ll start from the very beginning by creating our Laravel app using composer, creating the database, loading in the Twitter Bootstrap, creating a main layout, registering users, logging in and out and protecting routes using filters. We’ve got a lot of code to cover, so let’s get started!



Easy Wins For More Performant PHP

Making your website more performant can require a lot of layers. From setting up a reverse-proxy cache with Varnish to configuring a group of load balancers, there are many well-documented options. What if you're just starting out? What if you have a smaller application? Are there things you can do now that will make a difference? This article will explore easy wins for more performant PHP you can implement either as standard practices for your development team or principles you can retrofit for an existing application.



Social Network Style Posting with PHP, MongoDB and jQuery – Part 2

In the previous part of the series, we explained the database architecture, post stream design and application flow required for developing our post mechanism wherein the user will be able to post a status, like/unlike other people's statuses and comment on them. This part of the series will drive you through the coding required to implement these functionalities. We will use the application flow and database structure as discussed in the last article.



Localising JavaScript Strings in a PHP MVC Framework

Roland Clemenceau shows you how to efficiently localise your Javascript strings within your PHP Framework. There are actually several methods to localise Javascript strings in a PHP environment. Technically speaking it is possible to duplicate your Javascript file, naming it after the target language and loading the needed version each time the user selects a new language on site. But this surely represents a method that one could hardly call good practice, even though it would ‘work’. There is also the possibility to have your literal strings directly called by means of PHP variables embedded within your JavaScript code, but depending on your framework architecture, this is not always an option that’s available. This tutorial shows you a method that will work for sure and be easy to maintain.



Processing Data with PHP Using STDIN and Piping

Greg Freeman writes - PHP streams are still lacking in documentation and are rarely used compared to other PHP features. This is a shame because they can be really powerful and I have used them to gain a lot of performance when doing things such as processing log files. One of the more powerful features of Linux is the ability to pipe in data from another program. It’s often faster to offload tasks to an existing linux user space program than to do it in PHP and the added benefit is that you gain multi core processing which is not possible with standard PHP.



Introduction to Scaling PHP Applications – Part 1

This is the first blog in a two-part series on scaling PHP applications. Part one will focus on replacing Apache while part two will go into more advanced topics. Tom McFarlin writes - As far as building projects on or for WordPress is concerned, one of the things that we have to keep in mind is the minimum version of PHP required to run WordPress itself. At the time of this writing, the minimum required version is 5.2.4. Of course, if you know your project is going to run on a newer version of PHP and you have control over that environment, then obviously you have the freedom to write code against that version; however, if you’re building something that’s going to be used across the board for any of the many hosting environments, then you’ve got to take that into consideration.Many designers don’t use it much because it is more intimidating in terms of code, but the functions.php file might just be the most powerful theme file in WordPress. Let’s take a look at some of the possibilities it offers.Sensors are fun. They report from the physical world into the digital. But getting the signal into php is only the first part, you will have to get them out again. This post shows how to get data from analog sensors pushed to the browser.Authentication is required for virtually any type of web application. In this tutorial, I’d like to show you how you can go about creating a small authentication application using Laravel 4. We’ll start from the very beginning by creating our Laravel app using composer, creating the database, loading in the Twitter Bootstrap, creating a main layout, registering users, logging in and out and protecting routes using filters. We’ve got a lot of code to cover, so let’s get started!Making your website more performant can require a lot of layers. From setting up a reverse-proxy cache with Varnish to configuring a group of load balancers, there are many well-documented options. What if you're just starting out? What if you have a smaller application? Are there things you can do now that will make a difference? This article will explore easy wins for more performant PHP you can implement either as standard practices for your development team or principles you can retrofit for an existing application.In the previous part of the series, we explained the database architecture, post stream design and application flow required for developing our post mechanism wherein the user will be able to post a status, like/unlike other people's statuses and comment on them. This part of the series will drive you through the coding required to implement these functionalities. We will use the application flow and database structure as discussed in the last article.Roland Clemenceau shows you how to efficiently localise your Javascript strings within your PHP Framework. There are actually several methods to localise Javascript strings in a PHP environment. Technically speaking it is possible to duplicate your Javascript file, naming it after the target language and loading the needed version each time the user selects a new language on site. But this surely represents a method that one could hardly call good practice, even though it would ‘work’. There is also the possibility to have your literal strings directly called by means of PHP variables embedded within your JavaScript code, but depending on your framework architecture, this is not always an option that’s available. This tutorial shows you a method that will work for sure and be easy to maintain.Greg Freeman writes - PHP streams are still lacking in documentation and are rarely used compared to other PHP features. This is a shame because they can be really powerful and I have used them to gain a lot of performance when doing things such as processing log files. One of the more powerful features of Linux is the ability to pipe in data from another program. It’s often faster to offload tasks to an existing linux user space program than to do it in PHP and the added benefit is that you gain multi core processing which is not possible with standard PHP.This is the first blog in a two-part series on scaling PHP applications. Part one will focus on replacing Apache while part two will go into more advanced topics.