Archive for July 14th, 2006

PHPit.net: Read your e-mail with PHP!

PHPit.net offers up yet another fine tutorial for your learning pleasure - this time with a focus on email, reading it that is in Read your e-mail with PHP (catchy, eh?).

E-mail is something we use every day, and almost everyone has their own e-mail address. To read our e-mail most of us tend to use something like Microsoft Outlook or Mozilla Thunderbird, but it’s also possible to use PHP to read your e-mail. In this tutorial you will learn how.

I will take you through all the steps necessary to read your e-mail with PHP, and show you how to display all the newest e-mails in your inbox.

They use the POP3 class from PHPClasses.org to do most of the work, from connecting to thse server, logging in, grabing stats (like the number of emails), and grabbing and parsing out each email’s data.

Continue Reading · Add comment

php|architect: How can I help you?

There’s one simple fact in programming - coders love to code. They enjoy getting into the code, getting their hands dirty, and working through the problems to get everything working. After that, however, things can kind of slack off, especially in the area of support. Some projects don’t even have documentation to help out with the installation. So, how can you, as a developer, be better about helping your users? Read on in this new A/R/T article (from Stefan Koopmanschap) for a few ideas.

You work on a nice piece of open source software, alone or in a team. You can handle all you want by yourself. You plan everything, determine which features should be included, and of course you support your users. No problem. Until the moment comes that your software actually becomes popular. Popular enough to bring in a lot of new users. They all have questions regarding your software.

Instead of developing all the new features that you thought of, you find yourself more and more answering questions of users. From those questions, you get even more ideas, for instance on how to improve user interaction. But you have no time to work on those ideas anymore. Clearly, you have a need to offer more structured support.

He makes several suggestions of steps to take to a higher level of service to your users, including adding more people to your team and using other technologies (email, IRC, etc) to your advantage. Think about how many projects have channels over on the Freenode IRC network…

Continue Reading · Add comment

Icant.co.uk: How to create thumbnails with PHP and gd

One of the best moves that the PHP language developers could have made was to bring the GD library code “into the fold” and integrate it with recent PHP installations. This makes it easy to manipulate images and customize things on the fly. Another thing it allows is the generation of thumbnails for your site, either dynamically or in something like a cron job. Want to know how? Well, read up here.

In this article from Icant.co.uk, they step you through the creation of these smaller, lighter versions of your images with lots of code and explainations. Topics covered include:

  • The logic of batch processing thumbnails
  • The PHP functions to use
  • The main thumbnail generation function

They also include instructions on how to check your installation for GD support and how to load it if it’s not already there (module support).

Continue Reading · Add comment

Pierre-Alain Joye’s Blog: PECL Zip 1.5.0, features additions, modify OpenDocument

Pierre-Alain Joye updates us on the status of his PECL Zip extension, including a new release bumping it up to version 1.5.0.

Updates made in this release include the renaming of several methods, the addition of a few new methods (renameName, locateName, getNameIndex, etc), and two other fixes:

  • An update to the code for creating a “special type of archive” OpenDocument-supporting applications use.
  • An important fix to the Zip::Open method to make it return false on an error and true on success. (Sample code for this one is included).

You can grab this latest update on the package’s homepage.

Continue Reading · Add comment

Greg Beaver’s Blog: phpDocumentor and __get/__set/__call - give us your ideas (RFC)

In his latest post today, Greg Beaver is also taking a look at phpDocumentor and some of the documentation methods it allows, noting that providing the right notes on the “magic” functions has always been a point of difficulty.

One of the trickier feature requests for phpDocumentor has been documenting “magic” object properties and methods. By “magic” I am referring to properties and methods that are created dynamically by PHP 5.0+ userspace class methods __get, __set, __isset, __unset and __call.

He gives a code example of creating properties and a magic function (borp). To illustrate his point, he tries to specify the phpDocumentor format that would go with it - not an exact match, but with the help o ffour new tags it’s made easier: @property, @property-read, @property-write, and @method.

Continue Reading · Add comment