
You’re working on a software project, probably not a new situation if you’re reading this, and happen upon specific functionality you need for your project. Being the efficient (and lazy) developer that you are, you recognize that this functionality is general enough that it’s probably been needed by someone before and a library of some sort has been written for it. Why reinvent the wheel? So you jump on your preferred search engine, find a likely candidate, skim over the landing page, and conclude that this library meets your requirements.
Read more »
^[A-Za-z0-9-_.+%]+@[A-Za-z0-9-.]+.[A-Za-z]2,4$ It makes all the sense of ancient Egyptian hieroglyphics to you, although those little pictures at least look like they have meaning. But this… this looks like gibberish. What does it mean? It means oleomarg32@hotmail.com , Fiery.Rebel@veneuser.info , robustlamp+selfmag@gmail.ca , or nearly any other simple email address because this is a pattern written in a language that describes how to match text in strings
Read more »What do pictures in an online photo album, email attachments in a web-based mail client, and data files submitted to an online application for batch processing all have in common? They all rely on the ability to upload files across the Internet from the user’s web browser. Indeed, uploading files is an important feature of many of the sites and web-based applications we use on a daily basis. In this post, I show you how to add support for file uploads to your site using PHP
Read more »Superglobals are specially-defined array variables in PHP that make it easy for you to get information about a request or its context. They are called superglobal because they are always accessible, regardless of the scope — that is, you can access them from any function, class or file without having to do anything special. The superglobal variables are: $GLOBALS , $_SERVER , $_GET , $_POST , $_FILES , $_COOKIE , $_SESSION , $_REQUEST and $_ENV .
Read more »This is the final article in a three part series focused on setting up EC2 as a sandbox for application developers. I assume you have an AWS account with Amazon; if you don’t, please read Part 1 to learn how easy it is to sign up. I also assume you have configured your development environment and installed an AMI; if you haven’t, please read Part 2. In this installment, we’ll learn how to install Apache, MySQL and PHP in our running AMI, and then clone the AMI to make our own
Read more »
Many things that make the world as we know it possible are so commonplace that we forget they even exist. One of my favorite examples is the elevator; the idea of a lifting platform or box is very old but it had to wait for the Industrial Revolution to become a practical device. When Mr.More: PHPMaster: Introduction to PHP Arrays GA_googleFillSlot("Edit_300x100_C"); GA_googleFillSlot("Edit_300x100_D");
Read more »
In the last article we had a whistle stop tour of blocks. How they are defined, what purposes they serve and the differences between various Ruby versions. It was all very academic.View article: RubySource: Getting to Grips with Blocks II GA_googleFillSlot("Edit_300x100_C"); GA_googleFillSlot("Edit_300x100_D");
Read more »Cross-site request forgery (CSRF) is a common and serious exploit where a user is tricked into performing an action he didn’t explicitly intend to do. This can happen when, for example, the user is logged in to one of his favorite websites and proceeds to click a seemingly harmless link. In the background, his profile information is silently updated with an attacker’s e-mail address. The attacker can then use the website’s password reset feature to e-mail herself a new password and she’s just successfully stolen the account.
Read more »A variable is used in PHP scripts to represent a value. As the name variable suggests, the value of a variable can change (or vary) throughout the program. Variables are one of the features that distinguish a programming language like PHP from markup languages such as HTML. Variables allow you write your code in a generic mannerRead this article: PHPMaster: Variables in PHP
Read more »