Programming

Spell Checking in PHP

Fadıl

Introduction

Spell checking is a tool that many people cannot do without. However, it is rare to find such a useful extra when filling out a form on a Web page. Today you’ll learn how to use the PHP spell checking functions to create a robust spell checker that can be used just about anywhere.

The pspell/aspell PHP functions

PHP handles all of its spell-checking functionality through the use of the pspell/aspell libraries. These are available from Sourceforge at http://aspell.sourceforge.net/ andhttp://pspell.sourceforge.net/. With these libraries, PHP can:

How to Session Authentication

Fadıl

Web site authentication applies to most Web sites on the Internet. Implementation of authentication schemes, however, can vary significantly from one site to another.

Why use session authentication?

Let’s say you run the Web site www.myneatstore.com and you want your customers to be authenticated with a username and password before they are allowed to make purchases. To accomplish this, you could use a number of methods (the most obvious of which is the HTTP authentication headers).

Creating PDF Files in PHP

Fadıl

How dynamic PDFs can help you

When I found out that dynamic PDFs could be created in PHP, my first thought was: “That’s great, but what can dynamic PDF files actually do for me?” As far as I was concerned, PDF support was more trouble than it was worth.

However, as I started playing with the PDF support in PHP, I soon realized that there are all sorts of ways that I could use the PDF features of PHP to make my Web sites (and even my business) more efficient.

Error Handling in PHP-Part-II

Fadıl

The script

Now that you have a complete understanding of all of the constants and functions associated with error handling in PHP, you are ready to create your own error handling function. Our error handling function supports a number of different methods of reporting errors to the user, and can easily be configured to use all of them. We will also make use of the error_reporting()function to determine if the error should be handled at all or not.

Error Handling in PHP Part-I

Fadıl

Introduction

If you’re a developer, I’m sure you’ve experienced an error message in PHP. In fact, you should be quite familiar with the standard error message format such as this one caused by a call to the header() function after output as started:

Warning: Cannot add header information – headers already sent by (output started at /home/zend.com/proc.inc:6) in /home/zend.com/www/modify_account.php on line 41

This is a fairly typical error message — but did you know that this error message could be changed? In fact, not only can the format of the error message be changed, new features and logic (such as sending an e-mail when an error occurs) can also be developed. Today, we’ll explore custom error handling in PHP, and how you can use it to standardize and simplify error handling from within your scripts.