PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 1 to 20 of 215

php|tek '11 - Hacking in the (very) Windy City

php|tek '11 - Hacking in the (very) Windy City
Recently a group of PHP developers descended on the city of Chicago, IL - US for a few days of sharing, laughing, and coding. Rumor has it there may have been some dancing but there is no photographic evidence to support that. Click on in, I've got PIX cuz it did happen!

JavaWorld: Web-less PHP: Command Line PHP

JavaWorld: Web-less PHP: Command Line PHP
On JavaWorld they've posted a look at command-line PHP support including a few sample scripts to get you started:When I decided to give PHP a closer look, I wondered if PHP was a browser-only technology or if it could be used for command line scripting. It turns out that one can write operating system level scripts with PHP as discussed in online resources such as Command Line Scripting in PHP, Command Line PHP on Microsoft Windows, and Executing PHP files. In this blog post, I look at PHP command line...

Till Klampaeckel's Blog: Dependency Injection Containers

Till Klampaeckel's Blog: Dependency Injection Containers
Till Klampaeckel has a new post to his blog looking dependency injection containers for PHP and some of the concepts that come with them. No specific tools are advocated, but it's a good introduction to DI if you haven't had much exposure (and his view on why you may not want to use it).I got into a discussion on Twitter the other day where I mentioned that I don't like DI. Call it lack of sleep or language barrier (on my part), but I said DI - dependency injection - when I meant the dependency injection...

Community News: PHP Sadness - "Things in PHP that Make Me Sad"

Community News: PHP Sadness - "Things in PHP that Make Me Sad"
An interesting site has popped up in the PHP community during the last week - the PHP Sadness site, a listing of things that the author says "make him sad" about the PHP language.These are things in PHP which make me sad. They are real, objective issues which I have personally encountered in my normal day-to-day activites. Nothing on this site should be taken to be the view of my employer or is related to my employer in any way.The page is split up into several different sections including: Lexer/Parser...

Dealing with Maryland Unemployment

Dealing with Maryland Unemployment
Unlike the last posts where I have attempted to restrain myself a bit and not rant.A I'm going to enter full rant mode here. When I got laid off, I was looking at finances and realized: aoHey wait, I should be eligible for unemploymenta.A Now, I'll admit that I felt a bit weird about it.A I make enough money, I have enough assets that if push came to shove, I could live for quite a while.A But at the same time, my taxes pay for the benefits that others receive, I'm a legitimate case, and so it would be...

PHP|Tek 2011 TDD Code

PHP|Tek 2011 TDD Code
Thank you to everyone who attended my May 25th PHP|Tek talk on Test Driven Development. If you have not had a chance, please do leave feedback on joind.in. Per the audiance request, below are the requirements, test file and source code we developed during the live tutorial. Requirements: Hash object get and set function respond [...]

Lorna Mitchell's Blog: PHP OAuth Provider: Authenticate User

Lorna Mitchell's Blog: PHP OAuth Provider: Authenticate User
Lorna Mitchell has posted the next part in her series looking at working with OAuth in PHP, showing how to authenticate the user making the connection to your OAuth-enabled web service.This phase is probably the most familiar to us as developers, as it's simply a login form. The consumer will send the user to us at the URL we provided in the request token, and the user will have the request token key as a parameter. The access control on this page will look the same as on the rest of the website; if the...

The Accept Header

The Accept Header
Years ago, I wrote a book on HTTP. At the time, there wasn't a simple, comprehensive reference for HTTP beyond the various specs, and a really good understanding of HTTP is important if you want to become a really good web developer, which I did. As I was reading and learning everything I could, I was surprised to learn that such a book didn't already exist. Fast forward to today, and I can barely remember what I wrote. :-) One of the things I always struggle to remember is how to parse the Accept...

Chris Hartjes' Blog: Book Review -- CakePHP 1.3 Application Development Cookbook

Chris Hartjes' Blog: Book Review -- CakePHP 1.3 Application Development Cookbook
Chris Hartjes has posted a new book review to his blog today of the Packt Publishing release the "CakePHP 1.3 Application Development Cookbook". Like many other traditional "cookbook" style books, it provides a set of solutions to common issues CakePHP developers might come across.personally find the "cookbook" style of books to be the most helpful. They enable me to quickly find answers to the problem "show me how to do something realistic using your tool". Hello World doesn't cut it for the tools I...

Lazy evaluation with PHP

Lazy evaluation with PHP
My new article called Lazy evaluation with PHP has just been published in Web Species blog. Recently I needed to process a huge array of data and because of PHP's somewhat inefficient variables and especially arrays that was resulting in aoout of memorya errors. However, I couldn't use any other tools than PHP so was forced to come up with a solution implementation in it. Here is how I solved it using principles from functional languages. I talk about the problem I had and how I solved it, continue...

Slawek Lukasiewicz's Blog: Zend Framework: Reflection

Slawek Lukasiewicz's Blog: Zend Framework: Reflection
Slawek Lukasiewicz has a recent post to his blog looking at a tool that comes bundled with PHP that can help you find out more about your own code (or really any other piece of code out there) - the Reflection API. In his post he looks specifically at the functionality the Zend Framework has built on top of the base PHP API.Zend Framework has own Reflection extension. It is mostly build upon genuine PHP Reflection API and extends existing features. The completely new Zend_Reflection module feature is...

Community News: Latest PECL Releases for 05.31.2011

Community News: Latest PECL Releases for 05.31.2011
Latest PECL Releases: yaz 1.1.0

PHP OAuth Provider: Authenticate User

PHP OAuth Provider: Authenticate User
I've been working with OAuth, as a provider and consumer, and there isn't a lot of documentation around it for PHP at the moment so I thought I'd share my experience in this series of articles. This relates to the stable OAuth 1.0a spec, however OAuth2 has already started to be adopted (and differs greatly). This article uses the pecl_oauth extension and builds on Rasmus' OAuth Provider post. This post is the third in the series, following on from the ones about the initial requirements and how to how to...

Translating Twitter, part 2

Translating Twitter, part 2
Translating Twitter, part 2 London, UK Tuesday, May 31st 2011, 09:04 BST A while ago I wrote in an article about translating tweets in my client Haunt. For the translating itself I was using the Google Translate API, which has sadly be deprecated. Evil after all I suppose. I've now rewritten my translation code to use the Bing Translation APIs instead. You need to register an API key (see http://www.bing.com/developers/appids.aspx) to be able to use the APIs. The APIs that I am using are fairly simple...

Sync git fork with maintainer

Sync git fork with maintainer
I forked the joind.in project on GitHub, committed a few patches and sent pull requests. It was fun until I asked myself aohow do I keep my fork synced with the maintainer's repo?a I found the info (with minor bug) on Google Groups by Matt Todd. It deserved its own post post. Create and checkout aoupstream/mastera branch (or whatever you want to call it): git checkout -b upstream/master Link branch to maintainer's repo: git remote add upstream git://github.com/upstream_maintainer/master.git Pull...

Maarten Balliauw's Blog: Scaffolding and packaging a Windows Azure project in PHP

Maarten Balliauw's Blog: Scaffolding and packaging a Windows Azure project in PHP
Maarten Balliauw has a new post to his blog today talking about a new feature they're considering adding to the SDK API - the ability scaffold and package up a PHP application for use on the Windows Azure platform.With the fresh release of the Windows Azure SDK for PHP v3.0, it's time to have a look at the future. One of the features we're playing with is creating a full-fledged replacement for the current Windows Azure Command-Line tools available. These tools sometimes are a life saver and sometimes a...

Sameer Borate's Blog: Grabbing website Favicons using curl and php

Sameer Borate's Blog: Grabbing website Favicons using curl and php
Sameer Borate has a a new tutorial posted to his blog about grabbing favicons with curl and the help of the Google Shared Stuff API.Google Shared Stuff allows one to easily get the Favicon of any website with a single line. [...] This [curl request] will display the Favicon in the browser. An even more interesting thing we can do is to save the same to a PNG file.He includes the code to make the curl request to the Google service and save it as the local PNG file. Built on top of this is another script...

Jason Gilmore's Blog: Thirteen Zend Framework Tutorials

Jason Gilmore's Blog: Thirteen Zend Framework Tutorials
Jason Gilmore has posted a new article with a list of thirteen tutorials all centered around the Zend Framework but on a wide variety of topics.A few weeks ago I posted what turned out to be a rather popular compendium of productivity- and best practices-related PHP tutorials which I've published in recent years on Developer.com and PHPBuilder.com. As it happens I write about the Zend Framework with equal vigor, and figured readers might like to check out the list of Zend Framework tutorials I've written...

Michael Nitschinger's Blog: Caching responses in Lithium

Michael Nitschinger's Blog: Caching responses in Lithium
Michael Nitschinger has put together a guide to caching responses in the Lithium framework - a simple update that means your application dosen't even need to reach the controllers to do its job.I've hacked together a small example on how to easily cache full responses in Lithium. If you need to cache full Response objects in Lithium (which means that your controllers don't even get called when there's a cache hit), you can place this in your app/config/bootstrap/cache.php file (note that this is...

Play nice when extending Exception

Play nice when extending Exception
Lukas Smith has a suggestion for developers out there who get the idea to start messing with the order of the parameters of PHP objects/methods - play nice. His example is specifically with Exceptions.This is just a short follow up to a recent tweet of mine. I have seen this repeatedly happen, even to top notch and usually very careful developers (*). I am not sure why this mistake happens so frequently, but quite often you see code that changes the parameter order for custom Exception constructors. I...