PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 21 to 40 of 240

CodeWorks 2010 Recap

CodeWorks 2010 Recap
Approximately 10 days ago, I finished the 2010 CodeWorks Tour. This time around with 4 speakers hitting 5 cities, it was smaller, more compact, and generally a litte more intimate of an experience. Due to the odd nature of this one, I'm going to skip my usual "Good, Bad, Ugly" conference review format and go straight to some highs & lows. Venues: Since most of our attendees were local to each venue, we opted out of standard hotels. They're only cost-effective if you have 100+ people staying there....

Referrer and Comment spammers are a PITA.

Referrer and Comment spammers are a PITA.
This shouldn't be news to anyone - but Referrer and Comment spammers are a real pain in the a*se.A Polluting my web logs and making any meaningful log analysis problematic.So, I now have an itch to scratch and I'm going to do something about it. I would encourage you, the reader, to do something about it too.Firstly, get yourself over to Project Honey Pot and read up on the project.A If you can, set up a Honey Pot or two yourself. Also be sure to read about the http:BL - this works along similar lines to...

Tracking PHP errors

Tracking PHP errors
track_errors provides the means to catch an error message emitted from PHP. It's something I like to use during the development of various applications, or to get a handle on legacy code. Here are a few examples why! For exampleImagine the following remote HTTP call:$response = file_get_contents('http://example.org/');So whenever this call fails, it will return false and also emit an error message: Warning: file_get_contents(http://example.org): failed to open stream: could not connect to host in...

Talking JSON in Symfony2, like really!

Talking JSON in Symfony2, like really!
A while ago I posted about some issues I ran into trying to use 3rd party controllers as well as in my own controllers when supporting multiple output formats. I was dreaming of a world where the controllers could for the most part be totally oblivious to how they would be rendered. I have been talking to Jordi for a while now about adopting an "Agavi-Light" approach by adding a simple view layer that would enable users to easily support different formats without having to mess with their controllers yet...

Label Media Blog: Design Patterns in PHP - Factory method

Label Media Blog: Design Patterns in PHP - Factory method
On the Label Media blog today there's a new post from Tom Rawcliffe (the first part of a series) about a common design pattern you can use in your applications - the factory pattern.A design pattern is a template used by software engineers as a guideline of how to solve a particular problem. [...] In this series of articles I plan to explore some of the design patterns that i have found most useful in my time as a PHP developer, providing examples and notes. So, this being the first, we'll take a look at...

Chris Tankersley's Blog: Playing with Lithium

Chris Tankersley's Blog: Playing with Lithium
Chris Tankersley has posted his look at the Lithium framework as someone familiar with frameworks, just not one quite like this.Since my day job was generous enough to give me the entire week off (as a reward, thankfully not a "Don't bother coming into work next week, or ever" kind of thing), I decided that I would spend some time looking at a new framework. I haven't looked hard a new framework since I really started working with Zend Framework a few years ago. I decided to take a look at Lithium, an...

Maarten Balliauw's Blog: Writing for the Windows Azure for PHP portal

Maarten Balliauw's Blog: Writing for the Windows Azure for PHP portal
Maarten Balliauw has a new post to his blog with some resources you can use if you're looking to get started using PHP and Azure for your application.The good reason for not being that active on my blog lately is the fact that I'm producing content for Microsoft's Interoperability team. Have you ever wanted to start working with Windows Azure and PHP? No idea where to start? Meet the official portal: Developing Applications for Azure with PHP.He also links to a few specific resources that are cover...

Sameer Borate's Blog: How not to create a Random string

Sameer Borate's Blog: How not to create a Random string
In this latest post to his blog, Samer Borate talks about how not to create random strings and how, if you're not careful, it could backfire on you.It is surprising to see how after all the code floating around people still find it hard to create random numbers. In a recent piece of code I encountered, the following was used to generate a string of random numbers. The code was written to provide a random string to be passed to a email verifier system - the type wherein a new user when he subscribes to a...

Daniel Krook's Blog: Move from MySQL to DB2 via the Cloud

Daniel Krook's Blog: Move from MySQL to DB2 via the Cloud
In a new post to his blog Daniel Krook mentions a series he, Mark Nusekabel and Yan Li Mu wrote on migrating a PHP application over from MySQL to DB2 as a backend.IBM developerWorks has just published the first article in a series that Mark Nusekabel, Yan Li Mu and I wrote about our experience migrating a large PHP and MySQL application to DB2. In the four part series we look at preparation, switching databases, porting code, and finally deploying the application. This first installment covers the steps...

DZone.com: Meaningless docblocks considered harmful

DZone.com: Meaningless docblocks considered harmful
On DZone.com today Giorgio Sironi warns against something that you might not have considered before but could still be harmful to you and your code - meaningless docblock content that could be confusing.However, docblocks may become as evil as comments when they're not treated as first-class citizens. [...] Too often docblocks are generated and left there without any additional information. In other cases, they are filled mechanically with information that can already be inferred. In that case, you're...

Site News: Popular Posts for the Week of 11.26.2010

Site News: Popular Posts for the Week of 11.26.2010
Popular posts from PHPDeveloper.org for the past week:SitePoint PHP Blog: Top 10 MySQL Mistakes Made by PHP Developers Mashable.com: 8 Experts Break Down the Pros and Cons of Coding With PHP phpRiot.com: Using Callback Functions in PHP SimasToleikis' Blog: New to PHP 5.4: Traits Blitz Agency Blog: REST Service Routing with PHP and Apache Andrew Curioso's Blog: Error handeling stack in PHP 5.3+ Kevin Schroeder's Blog: Building better PHP programmers, part 2 Devis Lucato's Blog: Anonymous objects in PHP -...

Ruslan Yakushev's Blog: How to install PHP PEAR and phploc on Windows

Ruslan Yakushev's Blog: How to install PHP PEAR and phploc on Windows
Ruslan Yakushev has a recent post about installing the PEAR tools and installing an example package, phploc.PEAR (short for PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components. In includes many useful tools and components that can be easily downloaded and installed by using PEAR package manager. This post describes how to install and configure PEAR package manager and then how to use it to install a PEAR package. An example PEAR package used in...

Analysing Colours in an Image

Analysing Colours in an Image
Analysing Colours in an Image London, UK Thursday, November 25th 2010, 18:24 GMT For a project that I am working on, I had to figure out which colours are primarily used in an image so that it can be indexed for sorting. Obviously, there is only a small finite set of colours that we are interested in. This article shows on how I went about analysing an image to see which of those colours were primarily used in the image. First of all, I had to define a palette that I wanted to index on. Then I needed...

David Gardner's Blog: Why you should always use PHP interfaces

David Gardner's Blog: Why you should always use PHP interfaces
David Gardner has a suggestion for your development that he thinks can help keep things neat and tidy - using interfaces.This post was sparked by a very simple question from an ex-colleague: "Why bother with PHP interfaces?" The subtext here was that the classes themselves contain the interface definition (through the methods they define) and hence interfaces are not needed, particularly where there is only one class that implements a given interface.He talks about two reasons he things that interfaces...

Derick Allard's Blog: CodeIgniter Podcast: Episode #4

Derick Allard's Blog: CodeIgniter Podcast: Episode #4
The latest episode of the CodeIgniter Podcast was released yesterday and a guest on the show was Derick Allard, a former EllisLab-er. On Derick's blog there's a new post with his take on being a guest.Yesterday I had a chance to sit down and do Episode#4 of the CodeIgniter Podcast with Phil Sturgeon and Kenny Meyers. It was a blast! [...] In my opinion, the best part of any free-flow discussion like a podcast is that you get the (reasonably) unfiltered thoughts of people who are just plain excited by...

Brian Swan's Blog: Why Pass Parameters by Reference in the SQLSRV Driver?

Brian Swan's Blog: Why Pass Parameters by Reference in the SQLSRV Driver?
Brian Swaan has a new post to his blog talking about why you, in your SQL Server-based application, pass the parameters in by reference.Last week at JumpIn Camp we spent quite a bit of time focusing on the SQL Server Driver for PHP. As developers worked to build SQL Server support into their applications, they had lots of questions about how both the SQLSRV and PDO_SQLSRV drivers work under the hood. One of the questions that came up was "When using the SQLSRV driver to execute parameterized queries, why...

Kevin Schroeder's Blog: Amazon SQS and Zend Framework

Kevin Schroeder's Blog: Amazon SQS and Zend Framework
On his blog today Kevin Schroeder has a quick post about an issue with the queue name when working with the Amazon SQS service.I'm doing some work for a webinar and I figured out that if you want use AWS SQS in your app you need to specify not just the queue name, but the full URL. What is the full URL? It is what createQueue() returns.His code example shows a "before" and "after" of using the createQueue method to make the correct queue name. You can find out more about the Amazon Simple Queue Service...

Apache Zeta Components: Doing mail right

Apache Zeta Components: Doing mail right
Sending and receiving mail is a regular, but often cumbersome task. Especially, when it comes to more complex mails than just plain text. html and alternate text parts, embedded images, attachments and digests can make your brain spin if you need to do it yourself. The Apache Zeta Mail component makes it easy for you to send such mails, but also to receive them! In this article I show you how to send html emails with embedded images and how to receive all mails from an IMAP server and forward them in a...

Site News: Blast from the Past - One Year Ago in PHP

Site News: Blast from the Past - One Year Ago in PHP
Here's what was popular in the PHP community one year ago today:Symfony Blog: Books for symfony 1.3/1.4 CatsWhoCode.com: 10 awesome things to do with cURL Community News: Latest Release of Rediska Adam Jensen's Blog: Using Zend_Acl with Doctrine record listeners Phil Sturgeon's Blog: Send iPhone notifications from CodeIgniter Richard Thomas' Blog: Frameworks are like Hammers Inside DealTaker Blog: Kohana PHP 3.0 (KO3) Tutorial Part 1 IBuildings techPortal: Analysing PHP web applications with dtrace...

Keynoting at PHPBenelux

Keynoting at PHPBenelux
Have you got your tickets for PHPBenelux yet? If not then I hope you will do so because I would love to see you there! I'll be delivering a keynote at the PHPBenelux Conference in Antwerp in January alongside my good friend Ivo Jansch. Between us we've got plenty of stories to tell from our experiences in various areas of development and we'd like to share those with you! I hope you'll come along and join us, and if you are quick you can catch the early bird prices, saving 50 euro. On a personal note I...