php developer

› PHPit.net: Image manipulation with PHP & the GD library (Part 1)

PHPit.net has posted part one of a new series of tutorials focusing on working with the GD graphics library inside of PHP.

In this new article series you will learn about PHP's inbuilt image functions. In the first part you will see how to open images, display or save them, and how to write a simple image converter.

They start with a look at reading images in to start working with, in both GIF and JPEG formats. To make things simpler for life down the road, they opt to create their own simple "open_image" function that adapts to whatever kind of file it's given and returns an image resource.

Then it's over to the output - displaying and saving the images out to a local drive. Finally, they demonstrate how to convert images from one file type to another (as uploaded via a HTML form).

01/08/2006 11:13 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› DevShed: PHP Functions

DevShed shares some basic PHP knowledge today with this new tutorial, an introduction to functions in PHP. This time, they're specifically focusing on custom function creation.

If you're looking for a way to save time when you program, look no further. Creating functions lets you reuse code that you've used before without having to rewrite the whole thing.

This will save you time and make programming easier, especially as websites become more complex. Another advantage of a function is that it executes wherever and whenever you call it, in the same way that print() displays text.

They start off basic, defining what a "user defined function" is before moving on to arguments in their use. They include the method to define default values and how to return values once the function is through.

01/08/2006 4:52 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› PHP Magazine: IPM Poll Question: What Are the Misconceptions Surrounding PHP?

PHP Magazine has posted the results from one of their previous polls today - this time asking readers what they think the largest misconception surrounding PHP is.

The International PHP Magazine conducted a poll over the week, asking for your opinion on 'The misconceptions surrounding PHP'. The options provided were:
  • Java/ASP/Ruby/Python/Perl/C is better, and faster than PHP
  • PHP does not scale well
  • PHP has to write/read everything from a database
  • PHP does not support shared memory
  • PHP is not a compiled language
  • PHP can't run for days

The results from the poll showed unanimously that the impression that Java/ASP/Ruby/Python/Perl/C are better and faster than PHP topped the charts. Coming in close are two options - that PHP doesn't scale well and that PHP isn't a compiled language (surprising).

Check out their latest poll for the week asking what the most common security mistake is.

01/08/2006 1:43 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› WeberDev.com: PHP 101 (part 14): Going To The Polls

WeberDev.com has posted part 14 in their (never ending) "PHP 101" series today. This part talks about poll creation - display, voting, administration, and tracking.

Over the final two chapters of this tutorial, I'm going to guide you through the process of creating two real-world PHP applications. Not only will this introduce you to practical application development with PHP, but it will also give you an opportunity to try out all the theory you've imbibed over the past weeks.

The first application is fairly simple. It's a polling system for a web site, one which allows you to quickly measure what your visitors think about controversial issues.

They start with setting up the database to hold the votes - two simple tables, questions and answers. Then, it's on to the code - first displaying the form the users will vote with, then handling their response. Of course, what would a good application be without some kind of administrative utility to help manage and view the results - so they build one. It helps add/remove questions and check out the results of the polls.

01/08/2006 12:53 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› IBM developerWorks: Understanding the Zend Framework,Part 4: When there is no feed, Zend_HTTP_Client

The IBM developerWorks site has posted part four of their series looking at the Zend Framework. This latest article focuses on the Zend_HTTP_Client package.

Part 3 explains how to use the Zend Framework to construct our online feed reader, Chomp, by creating an interface to subscribe to and read feeds, and to save feed entries into the database. Now you will learn how to use the Zend Framework to incorporate Web sites that do not support RSS feeds into the online feed-reader interface.

They work their way through an example of pulling in content from a remote site (one that's feedless). This is an enhancement to the "Chomp" application they've been developing all along, so if you need to catch up, here's the previous parts - Part 1, Part 2, Part 3.

They update the indexController, deleteEntryAction, and the saveEntryAction methods to handle this new incoming data and make the needed changes to the views to handle the new output. Finally, they demonstrate how to save the entries pulled in through the Zend_HTTP_Client component.

01/08/2006 12:45 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› DevShed: Centralizing the Validation of Data with the Observer Pattern in PHP

DevShed wraps up its look at the Observer pattern in PHP with this last part of the series - centralizing the data validation of your PHP5 application using the Observer pattern.

Well, over the course of this last tutorial, I'll be moving the application of observer objects toward the real world, in this case by showing you how to include these objects within a set of form-validation classes. After reading this article, you should be equipped with a decent knowledge of how a form checking application can use the powerful features of this widely-known design pattern.

They look back first at the code for the form validation class from the previous article before moving on and building in more functionality - a FormObserver class. Finally, they pair the two classes to make a working, validating example.

31/07/2006 4:15 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› Scott Mattocks' Blog: PHP-GTK Mini News Update

Scott Mattocks has posted a mini news update on the world of PHP-GTK today on his blog:

Even though PHP-GTK News is still on hiatus, there are somethings that can't wait.

He congratulates Anant Narayanan on his cover story in the latest issue of php|architect - "Application Development with PHP-GTK 2". He also mentions the International PHP Conference and a speaker presenting there, Steph Fox, and her talk "Matruing Nicely - PHP-GTK 2" (covering the latest PHP-GTK 2 improvements).

31/07/2006 4:07 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› WeberDev.com: User Authentication with patUser (Part 3)

WeberDev.com has posted part three of their "User Authentication With patUser" series today, detailing some of the aditional functionality the patUser package has to offer.

While the API for user and group management does form the core of the patUser library, it's not all there is on display. patUser also includes a number of utility functions that can come in handy for certain specialized tasks.

These functions include identifying users and groups by different criteria (such as name or email address); keeping track of the URLs visited by the user so as to generate a user trail; maintaining user account statistics for auditing purposes; and providing exception-handling routines for more graceful error handling.

They give the details on how to:

  • make exceptions,
  • track the user's history through the site,
  • perform a natural selection search on user data,
  • how to identify users,
  • record stats about the user's activities

With this tutorial they finish off the series, providing a good solid overview of the patUser package. If you're just now reading the series, be sure to check out part one and part two.

31/07/2006 1:24 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› HowToForge.com: LAMP Installation On Ubuntu 6.06 For Linux Noobs

On HowToForge today, there's a new tutorial for those working with an up and coming version of linux, gaining more and more popularity all the time - Ubuntu. The tutorial details how to get a solid LAMP installation up and working on such a machine.

I, like many others, made the decision to attempt an install of Ubuntu 6.06 server with the preconfigured LAMP option without having ever attempted using Linux before. My goal was to build a setup that I could host my personal web site from. Embarking on this journey I had no idea how much knowledge I lacked and in turn would learn in my quest to host.

Hence, I am writing this as a partial documentation of my trials and tribulations with hopes of aiding all Linux noobs on the steps necessary to create a basic Linux, Apache2, MySQL5 and PHP5 system with FTP. Again, this document is tailored to complete Linux beginners and is in no way a complete guide to attacking such a setup. It will get you up and running but will need security hardening like no other.

He starts from the very beginning (a very good place to start) with the installation of version 6.06 of the Ubuntu server, including the LAMP option. With things installed, he shows how to get to a GUI environment and get to the configuration screen of the local Webmin installation (after installing it). Setup is as simple as a few clicks and form fields away, making customizing your server a breeze.

31/07/2006 1:17 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› Codewalkers.com: The PAVISE of Security

Codewalkers.com has posted a new tutorial today from Martin Psinas titled "The PAVISE of Security".

Join notepad as he tours safe coding practices. He presents an easy to remember mnemonic which explains each component to help keep secure coding practices at the forefront in your development.

In the tutorial he talks about the bad reputation that PHP seems to be gathering and how it's less about the langauge and more about the applications written in it. His response is shown the the acronym in the title: PAVISE- Privacy, Administration, Validation, Integrity, Sociology and Environment.

  • Privacy deals with keeping server-related info away from the client (what it shouldn't see)
  • Administration suggests knowing how things are configured, even if you don't have the access to change them
  • Validation (a huge factor) keeps the user data entered from doing bad things to you and your application
  • Integrity is the overall strength of your application
  • Sociology talks about methods to protect yourself from the social engineering that can happen to anyone
  • Environment requires knowing if you're working on a secure platform or not, which could undermine all other efforts

Under each of the headings items are listed out and detailed to help give you a more concrete example. Code examples are also included where appropriate.

31/07/2006 1:10 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

eZ publish™ copyright © 1999-2005 eZ systems as