News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Havard Eide's Blog:
SplObjectStorage
July 23, 2008 @ 08:47:44

Havard Eide has a recent post to his blog that looks at a part of the Standard PHP Library (SPL) that can be used with objects to store them for later use - SplObjectStorage.

In this post I will look at SplObjectStorage: a container that allows to store objects uniquely without the need to compare them one by one.

He lets the code to most of the talking, showing how to do the standard operations for a data store - adding objects (both unique and the same), updating objects in the store, checking to see if an object is already added and removing an object from storage.

0 comments voice your opinion now!
splobjectstorage add unique update check data storage object remove



Ilia Alshanetsky's Blog:
mail() logging for PHP
December 13, 2006 @ 16:56:00

In his latest blog entry, Ilia Alshanetsky has proposed (and provided) a patch that can help with one of the more abused of the popular PHP functions out there - mail().

One of the problems with solving the mail() abuse is figuring out who is doing it or perhaps what script was exploited to do it, since the mail() function does not offer any logging mechanism.

To address this problem, he's supplied this patch you can apply to your source to add two new options to the mail function:

  • enable the addition of the X-PHP-Originating-Script header
  • mail.log (takes a filename) allows you to enable logging of every single mail() call
Check out his entry for more details on configuration options and other functionality included with the patch.

0 comments voice your opinion now!
mail logging function patch add header configure mail logging function patch add header configure


JSLabs Blog:
Top 10 PHP frameworks (for 11.28.2006)
November 29, 2006 @ 07:37:00

The JSLabs website has posted a new list of what they see as the current Top Ten of PHP frameworks out there. It differs slightly from the previous list, including some of the newcomers and dropping some that have fallen behind.

Added to the list were:

And dropped from the list were: Each of the frameworks in the list have a brief description to give you a feel for what the project is all about.

0 comments voice your opinion now!
framework topten list add drop prado cakephp symfony codeigniter framework topten list add drop prado cakephp symfony codeigniter


DevShed:
Unit Testing in Detail
October 26, 2006 @ 09:58:00

Continuing in their effort to help PHP developers keep their code bug-free, DevShed has posted part two of the series looking at unit testing your applications. Previously they had looked at the basics - of they work and what they're for. This time, they dig a little deeper, showing some of the additional features and conditions that PHPUnit has to offer.

This week, you will learn about running multiple tests simultaneously, creating more informative error messages, and more.

They get back into something they mentioned briefly before - packaging tests in a separate archive to keep it out of the main body of code (the same way separating content and display functionality is good). They also talk about how to run more than one test at the same time, a handy feature that lets you make regression tests.

They also show how to create more informative error messages and how to manually add more testing conditions for you to check custom bits of code that don't quite fit with the assertNull, assertEquals, and assertFalse crowd.

This article is an excerpt from the Sams Publishing book "Advanced PHP Programming" by George Schlossnagle.

0 comments voice your opinion now!
tutorial unit testing additional features test conditions add tutorial unit testing additional features test conditions add


Sitecritic.net:
Simple Content Management in PHP Without Database Access
August 10, 2006 @ 07:26:50

For all of the content management systems that are out there, most of them have something in common (well, a lot in common, but that's more than I mean) - they all use databases to manage their information. Sometimes, that's just not what a developer really needs. All they want is a simple, light, file-based solution. Well, this new tutorial from Sitecritic.net can help. It details the creation of a simple file-based management system, including login abilities.

A Content Management System (CMS) allows you to update your website easily without touching anything in the backend. If you are a non-IT person, you will almost always want a CMS for your website because it makes you less dependent on your web designers or developers to add, edit or delete contents in your website.

There are many good CMS out there but most of them require some sort of database access in the backend. Many PHP CMS uses mysql or postgres database which resides in the server. Installation and troubleshooting of CMS might require some technical knowledge and server configuration which could be daunting for some.

The tutorial steps you through the login form first, then creating the template HTML files, before adding in the adding and editing functionality to store the content in the files. The full source for the application is also available for download.

0 comments voice your opinion now!
content management system flatfile login add edit html content management system flatfile login add edit html


Joshua Eichorn's Blog:
Adding AJAX to a website step by step
August 08, 2006 @ 11:59:44

Joshua Eichorn has posted this new tutorial to his site today, a detailed look at how to add Ajax to just about any site out there with the help of the HTML_AJAX PEAR package.

When looking at a adding AJAX you have a couple decisions you'll want to make up front. One is what tools your going to use. In the webthumb case thats pretty easy. Webthumb is a simple PHP app and doesn't use a framework, so I need a nice general PHP/AJAX framework that is easy to use, HTML_AJAX fits that need.

After picking my tools I need to decide what my goals are. My main focus will be to improve usability, but I also want to use AJAX to make the site seem a bit flashier, so its a bit of a technology demo too.

He uses his own current project, Webthumb as an illustration of his points including looks at remoting, a RequestStatus class, exporting a class with the HTML_AJAX package, and finally, making the Ajax calls.

0 comments voice your opinion now!
html_ajax add ajax webthumb remoting requeststatus html_ajax add ajax webthumb remoting requeststatus


Jonathan Diehl's Wiki:
Ajax ActiveTable
August 08, 2006 @ 06:18:46

Jonathan Diehl has submitted a new tutorial today about the creation (and demonstration) of an Ajax ActiveTable with a little help from the Sajax library.

The ActiveTable library creates an editable HTML table from a MySQL database table. The ActiveTable library consists of two classes and a few lines of JavaScript, embedded in a typical environment of a php website. The AJAX calls are realized using the Sajax Toolikit, which must be downloaded and installed separately.

The functionality allows the user to both create and remove rows of data from the database directly with a few simple calls back to a server-side handler to do the work. It can also dynamically create a table for the MySQL data it's looking at to make setup even easier.

The best part? The code for the project is ready for download to be used right away.

0 comments voice your opinion now!
ajax activetable sajax library database table add remove ajax activetable sajax library database table add remove


WeberDev.com:
User Authentication With patUser (Part 2)
June 17, 2006 @ 08:09:51

From WeberDev today, there's part two of their "User Authentication with patUser" series, this timie with a focus on managing user data with other patUser functionality.

patUser can do a lot more than just handle user authentication - the library also comes with a large number of methods designed to make the task of managing user data as simple and efficient as possible. Over the course of this second installment, I'm going to show you how these methods work, and how they can be used to quickly create scripts to view, add, edit and delete users (and user attributes) from your database. Keep reading!

They build on the previous article's foundation (and database) to insert some new user information for manipulation and output. They then give some sample code to pull all of the users from the database, pull details for each user (including additional fields created in a database update), and limiting the results based on one of the fields.

They also include another database table and the needed code to help organize the users into groups. They also include the functionality to add and remove groups and users as well as adding and removing people to/from groups directly from the patUser setup. Finally, they finish it with a few "real life" examples to help it all make sense together.

1 comment voice your opinion now!
patuser user authentication management add remove update delete patuser user authentication management add remove update delete


Matthew Leverton's Blog:
How to add a custom CAPTCHA to phpBB2
May 27, 2006 @ 11:46:07

In this tutorial from Matthew Leverton, there's information on adding a step several phpBB users could benefit from - putting a CAPTCHA image on the comment form to reduce spam issues.

phpBB is "an open source, flat style, message board written in PHP." Because thousands of people use it with little or no modifications, it is a very popular target for spammers. They can use bots to automatically fill out the registration forms, including "clicking" on the activation link inside e-mails. A CAPTCHA is some sort of challenge that will (in theory) be easy for a human to solve, but hard for a computer to. Typically, they are implemented as a distorted word that the user must enter to complete the form.

He walks the reader through each step of the way, giving shell commands and configuration changes where appropriate. The addition makes use of the freecap CAPTCHA script, making it a simple process of including the library in and adding a few lines to the comment form code inside phpBB.

1 comment voice your opinion now!
php tutorial add captcha phpbb2 freecap library php tutorial add captcha phpbb2 freecap library


Ben Ramsey's Blog:
Add Children with SimpleXML
May 11, 2006 @ 20:03:57

In this new post on Ben Ramsey's blog today, he shares his experiences with SimpleXML, mentioning specifically some of the undocumented functions that he's noticed.

I was very excited today while glancing through the code in ext/simplexml/simplexml.c to find some, as of yet, undocumented methods in PHP's SimpleXMLElement class. This discovery came after I've spent several hours over the last couple of nights banging my head against the desk to figure out a way to create a class that extends SimpleXMLElement and adds a new method for adding a child, which would have to use DOM in order to work-or so I thought.

Of course, it's wasn't as easy as it seemed, and Ben soon found some of the limitations of the SimpleXML library. Of course, he did manage to find a way to add new children to the document you're working with (something that normally would have required the intervention of the DOM functionality). Check out the post for a code example.

2 comments voice your opinion now!
php simplexml add children undocumented feature methods dom xml php simplexml add children undocumented feature methods dom xml



Community Events











Don't see your event here?
Let us know!


example zendframework developer database package PEAR framework security release application cakephp PHP5 zend ajax releases conference mysql code job book

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework