Product Overview

Looking for the old edition of “The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition?
Download the code archive or view errata of the old edition here.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition

Symbols

$_SESSION, (Discussion), (How do I create a session class?)
$this variable, (The $this Variable), (Static Properties and Methods)
.forward file, (Solution)
.htaccess file, (Configuration Mechanisms)
.ini files
storing configuration information, (Solution)

A

abstract classes
about, (Abstract Classes and Methods)
abstract methods
about, (Abstract Classes and Methods)
AcceptPathInfo
"pretty" URLs, (Pretty URLs with AcceptPathInfo)
access
to cron utility, (Does the host provide you access to cron, the Unix utility that allows you to schedule batch jobs?)
files on remote servers, (How do I access a file on a remote server?)
to SSH, (Does the host provide you with SSH access to the server?)
URLs, (Failure to Restrict URL Access)
access control, (Access Control)
changing passwords, (How do I let users change their passwords?)
forgotten passwords, (How do I deal with members who forget their passwords?)
HTTP authentication, (How do I use HTTP authentication?)
permission systems, (How to do I build a permissions system?)
private sections of web sites, (How do I create a class to control access to a section of the site?)
registration systems, (How do I build a registration system?)
session classes, (How do I create a session class?)
storing sessions in databases, (How do I store sessions in a database?)
using sessions, (How do I use sessions?)
AccountMaintenance class, (The AccountMaintenance Class), (Modifying AccountMaintenance)
adding
data in databases, (How do I add data to, or modify data in, my database?)
aggregation
about, (Object Aggregation and Composition)
agile documentation
about, (Testing Using SimpleTest or PHPUnit)
allow_url_fopen, (Includes and Execution Settings)
anti-spam (see spam legislation)
Apache web server
caching, (How do I control client-side caching?)
hosting support, (Does the host support Linux and Apache?)
HTTP authentication, (How do I use HTTP authentication?)
PHP installation, (Is PHP installed as an Apache module (not the CGI variant)?)
APIs
about, (Encapsulation and Visibility)
callback arguments, (Solution)
documenting, (How can I document my code for later reference by myself or others?)
REST web services, (Solution)
arguments
overriding properties, (Overriding Methods and Properties)
arrays
of lines, (How do I break up text into an array of lines?)
reading files as, (Reading a File as an Array)
strings, (Strings)
asp_tags, (Includes and Execution Settings)
assertions
testing framework, (Discussion)
attachments
adding to email messages, (How do I add attachments to messages?)
Auth class, (Solution)
authentication, (Summary)
(see also HTTP authentication)
defined, (Discussion)
security, (Broken Authentication and Session Management)
authentication headers, (Discussion)
authorization
defined, (Discussion)
authorization header, (Discussion)
auto-commit mode
default mode, (Discussion)
auto_append_file, (Includes and Execution Settings)
auto_prepend_file, (Includes and Execution Settings)
autoincrementing field
determining INSERT's row number, (How do I find out a new INSERT’s row number in an autoincrementing field?)

B

back-ups
database, (How do I back up my database?)
bandwidth
reading files, (Discussion)
bar graph
creating, (Creating a Bar Graph)
batch jobs
scheduling, (Does the host provide you access to cron, the Unix utility that allows you to schedule batch jobs?)
behavioral testing
about, (Testing Using SimpleTest or PHPUnit)
branches
revision control software, (Solution)
bridge tables
about, (Setting Up the Database)
browsers (see Internet Explorer; web browsers)
buffering (see output buffering)
build systems
developing code, (Using a Build System)

C

cache files
protecting, (Solution)
Cache_Lite (see PEAR::Cache_Lite)
Cache_Lite cache
purging, (How do I purge the Cache_Lite cache?)
Cache_Lite_Function class, (Solution)
caching, (Caching)
client-side, (How do I control client-side caching?)
examining HTTP headers in web browsers, (How do I examine HTTP headers in my browser?)
file downloads with Internet Explorer, (How do I cache file downloads with Internet Explorer?)
function calls, (How do I cache function calls?)
output buffering for server-side caching, (How do I use output buffering for server-side caching?)
parts of pages, (How do I cache just the parts of a page that change infrequently?)
PEAR::Cache_Lite configuration options, (What configuration options does Cache_Lite support?)
purging Cache_Lite cache, (How do I purge the Cache_Lite cache?)
using PEAR::Cache_Lite for server-side caching, (How do I use PEAR::Cache_Lite for server-side caching?)
calendars
creating, (How do I create a calendar?)
call_time_pass_reference, (Includes and Execution Settings)
callbacks
arguments, (Solution)
error handler prototype, (Solution)
CAPTCHA (Completely Public Turing Test to Tell Computers and Humans)
image verification, (How do I create images that can be verified by humans only?)
CGI mode, (Is PHP installed as an Apache module (not the CGI variant)?)
change password form
example of, (The Change Password Form)
changesets
revision control software, (Discussion)
characters (see escape characters; wildcard characters)
charts
displaying, (How do I display charts and graphs with PHP?)
classes, (Summary)
(see also abstract classes; PEAR)
(see also specific classes)
about, (Classes Explained)
access control for sections of web sites, (How do I create a class to control access to a section of the site?)
repositories of reusable PHP classes, (Alternatives to PEAR)
client-side caching
controlling, (How do I control client-side caching?)
code, (Summary)
(see also source code)
coding standards, (Choosing a Coding Standard)
deploying, (How can I deploy code safely?)
documenting, (How can I document my code for later reference by myself or others?)
maintaining multiple versions, (How can I maintain multiple versions of a single codebase?)
reuse, (Solution)
revising old code, (I’ve reviewed some of my old code, and it’s horrible. How can I make it better?)
testing framework, (How can I ensure future changes to my code won’t break current functionality?)
tracking revisions, (How do I track revisions to my project’s code?)
writing distributable code, (How can I write distributable code?)
writing portable code, (How do I write portable PHP code?)
code coverage reports, (Solution)
command line
use of, (What’s the hosting provider’s policy on running scripts and programs from the command line?), (Will PHP be available for use from the command line?)
communications
security, (Insecure Communications)
composition
about, (Composition)
compressing
database data, (Compressing Database Data)
files, (How do I create compressed ZIP/TAR files with PHP?)
concatenation
strings, (Strings)
Concurrent Versioning System (CVS), (Discussion)
configuration, (PHP Configuration)
documentation about, (I. Getting Started and II. Installation and Configuration)
PEAR::Cache_Lite, (What configuration options does Cache_Lite support?)
for portable code, (Keeping Configuration Central)
settings, (The Auth Class)
storing configuration information in files, (How do I store configuration information in a file?)
configuration files
used in access control examples, (Access Control)
constructors
Auth class, (The Auth Class)
defined, (Constructors and Destructors)
overriding, (Overriding Methods and Properties)
content
searching for in XML, (How do I search for a node or content in XML?)
content-disposition header, (Solution)
content-length header, (Solution)
Content-Type header, (Solution), (Solution)
control (see access control; error handling)
COUNT function
rows returned from a SELECT call, (Counting the Rows Returned)
credentials
passing in DSN, (The DSN in Detail)
cron utility
access to, (Does the host provide you access to cron, the Unix utility that allows you to schedule batch jobs?)
cross-site request forgery (CSRF)
about, (Cross-site Request Forgery (CSRF))
cross-site scripting (XSS), (Discussion)
about, (Cross-site Scripting (XSS))
session security, (Session Security)
cryptographic storage
security, (Insecure Cryptographic Storage)
CURRENT_TIMESTAMP function, (Solution)

D

data
compressing in databases, (Compressing Database Data)
outputting in table, (How do I display data in a table?), (How do I display data in a sortable table?)
data grids
customized, (How do I create a customized data grid?)
data types
strings, (Strings)
database connections
setting up, (The Signup Page)
database servers
port numbers, (Other Concepts)
database transactions
defined, (Discussion)
databases, (Using Databases with PDO), (How do I use stored procedures with PDO?)
accessing, (How do I access a database?)
adding or modifying data, (How do I add data to, or modify data in, my database?)
backing-up, (How do I back up my database?)
compressing data, (Compressing Database Data)
errors in SQL queries, (How do I resolve errors in my SQL queries?)
escape characters, (Solution)
fetching data from tables, (How do I fetch data from a table?)
flexible SQL statements, (How do I create flexible SQL statements?)
INSERT's row number using autoincrementing field, (How do I find out a new INSERT’s row number in an autoincrementing field?)
PDO, (What is PDO?)
permission systems, (Setting Up the Database)
rows affected by SQL queries, (How do I find out how many rows I’ve touched?)
searching tables, (How do I search my table?)
SQL injection attacks, (How do I protect my web site from an SQL injection attack?)
storing sessions, (How do I store sessions in a database?)
transactions, (How do I work with transactions?)
DatabaseSession class, (The DatabaseSession Class), (Using the DatabaseSession Class)
date function, (Solution), (Solution), (Discussion)
DATE_ADD function, (Solution)
date_default_timezone_set function, (Discussion)
DATE_FORMAT function, (Solution)
DATE_SUB function, (Solution)
dates and times, (Summary), (Dates and Times)
(see also HTTP dates)
calendars, (How do I create a calendar?)
current, (How do I obtain the current date?)
date calculations using MySQL, (How do I perform date calculations using MySQL?)
days of the week, (How do I find a day of the week?)
formatting MySQL timestamps, (How do I format MySQL timestamps?)
number of days in month, (How do I find the number of days in a month?)
storing dates in MySQL, (How do I store dates in MySQL?)
Unix timestamps, (How do I use Unix timestamps?)
days
in a month, (How do I find the number of days in a month?)
of week, (How do I find a day of the week?)
defaults
error mode, (Using Silent Mode)
mode in PDO, (Discussion)
deploying
code, (How can I deploy code safely?)
destructors
defined, (Constructors and Destructors)
dir pseudo-class, (Using the dir Pseudo-Class)
direct object references
security, (Insecure Direct Object Reference)
directories
examining, (How do I examine directories with PHP?)
DirectoryIterator class, (How do I work with files using the Standard PHP Library in PHP 5?)
display_errors directive, (The display_errors Directive), (How do I display errors and exceptions gracefully?), (Includes and Execution Settings)
displaying (see outputting)
distributed systems
revision control software, (Discussion)
docblocks
about, (Solution)
documentation, (Summary)
(see also agile documentation)
code, (How can I document my code for later reference by myself or others?)
for PHP, (Where do I get help?)
test suites as, (Discussion)
DOM
generating XML, (Generating XML Using the DOM)
DOM functions
navigating XML, (Discussion)
DOM XML extension, (Solution)
downloads
caching files with Internet Explorer, (How do I cache file downloads with Internet Explorer?)
DSN (Data Source Name)
about, (The DSN in Detail)
dynamic SQL
sprintf function, (Discussion)
dynamic web pages
caching, (Caching)

E

E_ERROR error level, (The error_reporting Directive)
E_NOTICE error level, (The error_reporting Directive)
E_STRICT error level, (Solutions), (Using the PEAR::Mail Package), (The error_reporting Directive), (The Restricted Area)
E_USER_ERROR error level, (The error_reporting Directive), (Discussion)
E_USER_NOTICE error level, (The error_reporting Directive), (Discussion)
E_USER_WARNING error level, (The error_reporting Directive), (Discussion)
E_WARNING error level, (The error_reporting Directive)
email, (Email)
adding attachments, (How do I add attachments to messages?)
email injection attacks, (How can I protect my site against email injection attacks?)
generating complex emails, (How do I simplify the generation of complex emails?)
groups, (How do I mail a message to a group of people?)
incoming email, (How do I handle incoming mail with PHP?)
sending files, (Discussion)
sending HTML email, (How do I send HTML email?)
sending simple email, (How do I send a simple email?)
email injection attacks, (How can I protect my site against email injection attacks?)
encapsulation
about, (Encapsulation and Visibility)
environmental errors
defined, (Error Handling)
environmental PHP errors
handling as exceptions, (How can I handle PHP errors as if they were exceptions?)
ERRMODE_EXCEPTION, (Using Exception Mode)
ERRMODE_SILENT, (Using Silent Mode)
ERRMODE_WARNING, (Using Warning Mode)
error handling, (Error Handling)
custom error handlers, (How do I implement a custom error handler with PHP?)
custom exception class, (How do I create a custom Exception class?)
custom exception handler, (How do I implement a custom exception handler with PHP?)
displaying errors and exceptions, (How do I display errors and exceptions gracefully?)
E_STRICT constant, (Solutions)
error levels reported, (What error levels does PHP report?)
handling as if they were exceptions, (How can I handle PHP errors as if they were exceptions?)
logging and reporting, (How do I log and report errors?)
redirecting to another page, (How do I redirect users to another page following an error condition?)
security, (Information Leakage and Improper Error Handling)
settings, (What built-in settings does PHP offer for error handling?), (Error-related Settings)
SQL queries, (How do I resolve errors in my SQL queries?)
triggering errors, (How can I trigger PHP errors?)
using exceptions for, (How can I use PHP exceptions for error handling?)
error notices
JpGraph, (Solutions)
error_log, (Error-related Settings)
error_log directive, (The log_errors and error_log Directives)
error_log function, (Solution)
error_reporting directive, (The error_reporting Directive), (Includes and Execution Settings)
escape characters
in databases, (Solution)
exception class, (How do I create a custom Exception class?)
exception classes
defining, (The SignUp Class)
exception handlers
implementing, (How do I implement a custom exception handler with PHP?)
exception mode
errors in SQL queries, (Using Exception Mode)
exceptions
displaying, (How do I display errors and exceptions gracefully?)
handling errors as if they were exceptions, (How can I handle PHP errors as if they were exceptions?)
using for error handling, (How can I use PHP exceptions for error handling?)
execution
settings, (Includes and Execution Settings)
EXIF information
extracting, (How do I extract EXIF information from images?)
exif_read_data function, (Solution)
Expires header, (Discussion)
Expires meta tag, (Discussion)
explode function, (Solution)
extension, (Miscellaneous Settings)
extension_dir, (Miscellaneous Settings)
extensions
available from hosting service, (Ask for a list of installed PHP extensions.)
documentation about, (PHP Extensions)
XML, (Which XML technologies are available in PHP 5?)
extracting
files, (Compressing Simple Files)

F

fatal errors
handling as exceptions, (How can I handle PHP errors as if they were exceptions?)
features
documentation about, (V. Features)
fetchObject method
prepare and execute, (Using Fetch Choices)
fields (see auto-incrementing field; form fields)
file execution attacks, (Malicious File Execution)
file handles
using, (How do I use file handles?)
file pointers
using, (How do I use file handles?)
file_get_contents function, (Reading a File as a String)
file_put_contents function, (Solution)
files, (Summary), (Working with Files)
(see also specific files)
(see also ZIP utility)
accessing information about local files, (How do I access information about a local file?)
accessing on remote servers, (How do I access a file on a remote server?)
caching downloads with Internet Explorer, (How do I cache file downloads with Internet Explorer?)
creating compressed ZIP/TAR files, (How do I create compressed ZIP/TAR files with PHP?)
examining directories, (How do I examine directories with PHP?)
FTP, (How do I use FTP from PHP?)
managing downloads, (How do I manage file downloads with PHP?)
modifying local files, (How do I modify a local file?)
outputting source code online, (How do I display PHP source code online?)
reading local files, (How do I read a local file?)
SPL, (How do I work with files using the Standard PHP Library in PHP 5?)
storing configuration information in, (How do I store configuration information in a file?)
fonts (see TrueType fonts)
form fields
prepopulating, (Solution)
formatting
dates, (Dates and Times)
MySQL timestamps, (How do I format MySQL timestamps?)
output text, (How do I output formatted text?)
strings, (How do I preserve formatting?)
forms (see HTML forms)
FTP (File Transfer Protocol)
using, (How do I use FTP from PHP?)
function calls
caching, (How do I cache function calls?)
functions, (Summary)
(see also specific functions)
file information, (Solution)
fwrite function, (Solution)

G

galleries (see thumbnail galleries)
generating, (Summary)
(see also sending)
complex emails, (How do I simplify the generation of complex emails?)
GNU Make, (Using a Build System)
graphical watermarks
displaying, (Displaying a Graphical Watermark)
graphs
displaying, (How do I display charts and graphs with PHP?)
grids (see data grids)
groups
email, (How do I mail a message to a group of people?)

H

handles (see file handles; file pointers)
header lines
email injection attacks, (How can I protect my site against email injection attacks?)
headers (see authentication headers; authorization header; Expires header; HTTP headers; request headers; page expiry headers)
help (see documentation)
highlight_file function, (Solution)
highlight_string function, (Solution)
hinting (see type hinting)
hints
passwords, (How do I deal with members who forget their passwords?)
hosting
checklist, (Hosting Provider Checklist)
HTML
meta tags, (Using HTML Meta Tags)
HTML email
sending, (How do I send HTML email?)
HTML forms
building, (How do I build HTML forms with PHP?)
HTML tags
stripping from text, (How do I strip HTML tags from text?)
HTML_QuickForm class, (Solution)
HTML_Quickform package, (The Signup Page), (The Reset Password Page)
HTML_Table class, (Solution)
HTML_Table_Matrix class, (Solution)
htmlentities function, (Solution)
HTTP authentication
about, (How do I use HTTP authentication?)
HTTP Authentication package, (Discussion)
HTTP dates
calculation of, (Discussion)
HTTP headers
caching, (Using HTTP Headers)
examining in web browsers, (How do I examine HTTP headers in my browser?)
file downloads, (Solution)
output buffering, (HTTP Headers and Output Buffering)
HTTP response headers, (Discussion)
http.conf file
hotlinking images, (Using Apache’s mod_rewrite)

I

ignore_repeated_errors, (Error-related Settings)
ignore_repeated_source, (Error-related Settings)
imagecopyresampled function, (Solution)
images, (Images)
charts and graphs, (How do I display charts and graphs with PHP?)
EXIF information, (How do I extract EXIF information from images?)
hotlinking, (How do I prevent the hotlinking of images?)
human verification, (How do I create images that can be verified by humans only?)
MIME type, (How do I specify the correct image MIME type?)
resizing, (How do I resize images without stretching them?)
thumbnail galleries, (How can I put together a simple thumbnail gallery?)
thumbnails, (How do I create thumbnail images?)
watermarks, (How do I add a watermark to an image?)
implode function, (Discussion)
include_path, (Includes and Execution Settings)
includes
settings, (Includes and Execution Settings)
incoming email
handling, (How do I handle incoming mail with PHP?)
information leakage
security, (Information Leakage and Improper Error Handling)
inheritance
about, (Inheritance)
ini_alter, (Configuration Mechanisms)
ini_set, (Configuration Mechanisms)
injection flaws, (Injection Flaws)
INSERT function
data into databases, (INSERT Data into the Database)
determining row number with autoincrementing field, (How do I find out a new INSERT’s row number in an autoincrementing field?)
installation
documentation about, (I. Getting Started and II. Installation and Configuration)
PEAR, (Installing PEAR)
PHP on Apache web server, (Is PHP installed as an Apache module (not the CGI variant)?)
Zend Framework, (XML and Web Services)
interfaces, (Summary)
(see also object interfaces)
defined, (Polymorphism)
Internet Explorer
caching file downloads, (How do I cache file downloads with Internet Explorer?)
interpolation, (Summary)
(see also variable interpolation)
strings, (Strings)
INTERVAL keyword, (Solution)

J

jobs (see batch jobs)
JpGraph library, (Solutions)

L

LAMP
hosting support, (Hosting Provider Checklist)
levels
errors, (What error levels does PHP report?)
LIKE operator
searching tables, (Solution)
lines
arrays of, (How do I break up text into an array of lines?)
Linux
dates, (Discussion)
hosting support, (Does the host support Linux and Apache?)
session security, (Session Security)
listInsertId method
using, (Solution)
local files
accessing information about, (How do I access information about a local file?)
modifying, (How do I modify a local file?)
reading, (How do I read a local file?)
localhost
connecting to MySQL databases, (Solution)
log_errors, (The log_errors and error_log Directives), (Error-related Settings)
logging
errors, (How do I log and report errors?)
logic errors
defined, (Error Handling)
login
magic quotes, (The Auth Class)

M

magic methods
about, (Magic Methods)
magic quotes
checking for, (Checking for Magic Quotes)
magic_quotes_gpc, (The Auth Class), (Includes and Execution Settings)
mail function, (Using the PHP mail Function)
Mail_mime package, (The Signup Page), (The Reset Password Page)
max_execution_time, (Includes and Execution Settings)
MD5 algorithm
passwords, (The Auth Class)
security, (Insecure Cryptographic Storage)
member variables (see properties)
memory_limit, (Includes and Execution Settings)
meta tags
caching, (Using HTML Meta Tags)
methods, (Summary)
(see also abstract methods; magic methods; static methods)
about, (Classes Explained)
overriding, (Overriding Methods and Properties)
Microsoft Windows (see Windows)
MIME type
specifying, (How do I specify the correct image MIME type?)
mktime function, (Solution)
mod_rewrite
"pretty" URLs, (Pretty URLs with mod_rewrite)
hotlinking images, (Using Apache’s mod_rewrite)
modes (see exception mode; silent mode; warning mode)
modifying
data in databases, (How do I add data to, or modify data in, my database?)
local files, (How do I modify a local file?)
multi-processing module (MPM)
hosting support, (Does the host support Linux and Apache?)
MultiViews
"pretty" URLs, (Pretty URLs with MultiViews)
MyISAM engine
performance, (The DatabaseSession Class)
MySQL
calculating dates, (How do I perform date calculations using MySQL?)
MyISAM engine performance, (The DatabaseSession Class)
stored procedure example, (Discussion)
storing dates, (How do I store dates in MySQL?)
MySQL databases
connecting to on localhost, (Solution)
MySQL timestamps
formatting, (How do I format MySQL timestamps?)
mysql_real_escape_string function, (Solution)
MySQLDump class
operating system configuration, (Solution)
using, (Catering to Platform Differences)

N

namespaces
choosing, (Choosing a Namespace)
defined, (How can I consume XML-RPC web services?)
nodes
searching for in XML, (How do I search for a node or content in XML?)
non-distributed systems
revision control software, (Discussion)
“notice” error messages, (Discussion)
NOW function, (Solution)

O

object interfaces
about, (Object Interfaces)
object oriented programming (OOP)
about, (What is OOP?)
using, (Using OOP)
object type hinting, (Solution)
objects
creating, (Creating Objects)
treating as strings, (Treating an Object Like a String)
open source
revision control software, (Discussion)
Open Web Application Security Project (OWASP), (Security Checklist)
open_basedir, (Includes and Execution Settings)
operating systems
MySQLDump class, (Solution)
output buffering
caching parts of pages, (Solution)
displaying errors and exceptions, (Solution)
server-side caching, (How do I use output buffering for server-side caching?)
outputting
charts and graphs, (How do I display charts and graphs with PHP?)
data in table, (How do I display data in a table?), (How do I display data in a sortable table?)
errors and exceptions, (How do I display errors and exceptions gracefully?)
formatted text, (How do I output formatted text?)
source code online, (How do I display PHP source code online?)
strings, (How do I output strings safely?)
overloading
servers, (To what degree does the host “overload” the server?)
overriding
constructors, (Overriding Methods and Properties)
methods and properties, (Overriding Methods and Properties)

P

packet sniffers
data security, (Access Control)
page expiry headers
setting, (Setting a Page Expiry Header)
pages
caching parts of, (How do I cache just the parts of a page that change infrequently?)
preventing web browsers from caching, (How do I prevent web browsers from caching a page?)
parsing
RSS feeds, (How do I parse an RSS feed?)
XML with XMLReader, (Parsing XML with XMLReader)
passing
credentials in DSN, (The DSN in Detail)
passwords
changing, (How do I let users change their passwords?)
forgotten, (How do I deal with members who forget their passwords?)
MD5 algorithm, (The Auth Class)
security, (Broken Authentication and Session Management)
PDO (PHP Data Object)
about, (What is PDO?)
auto-commit mode, (Discussion)
PEAR, (Working with PEAR)
alternatives to, (Alternatives to PEAR)
installing, (Installing PEAR)
PEAR Coding Standards, (Choosing a Coding Standard)
PEAR package manager, (The PEAR Package Manager)
PEAR packages
PHP 5 E_STRICT compliance, (The Restricted Area)
PEAR::Cache_Lite
configuration options, (What configuration options does Cache_Lite support?)
server-side caching, (How do I use PEAR::Cache_Lite for server-side caching?)
PEAR::HTML_QuickForm package, (Solution)
PEAR::Mail class, (How do I simplify the generation of complex emails?)
PEAR::Mail package, (Using the PEAR::Mail Package)
PEAR::Mail_Mime class, (How do I simplify the generation of complex emails?), (How do I add attachments to messages?), (Discussion), (How do I send HTML email?), (How do I mail a message to a group of people?), (Solution)
PEAR::Net_FTP class, (Using the PEAR::Net_FTP Class)
PEAR::Validate class, (Solution)
performance
MyISAM engine, (The DatabaseSession Class)
permissions
files on Unix-based Web servers, (Discussion)
permissions systems
building, (How to do I build a permissions system?)
Phing, (Using a Build System)
php.ini file
configuration, (Configuration Mechanisms)
date.timezone setting, (Discussion)
error handling settings, (How do I implement a custom error handler with PHP?)
error logging settings, (Solution)
safe_mode, (Is PHP Safe Mode disabled?)
phpDocumentor, (Solution)
phpinfo function, (Can you see the output of phpinfo on the server you will actually be assigned to?)
phpt testing framework, (Solutions), (Testing Using phpt)
PHPUnit, (Solutions), (Discussion)
pie charts
creating, (Creating a Pie Chart)
placeholders
date function, (Discussion)
pointers (see file pointers)
polymorphism
about, (Polymorphism)
port numbers
database servers, (Other Concepts)
portability
settings, (Key Security and Portability Settings)
post_max_size, (Includes and Execution Settings)
prepare and execute methods
PDO database access, (Using the Prepare and Execute Methods)
SQL injection attack, (Discussion)
prepopulating
form fields, (Solution)
preserve state, (How do I use sessions?)
"pretty" URLs, (How do I make “pretty” URLs in PHP?)
printf function, (Solution)
printing (see outputing)
private implementation
defined, (Encapsulation and Visibility)
programming errors
defined, (Error Handling)
properties, (Summary)
(see also static properties)
about, (Classes Explained)
overriding, (Overriding Methods and Properties)
protected visibility
defined, (Encapsulation and Visibility)
protecting
cache files, (Solution)
prototypes
error handlers, (Solution)
proxy servers
caching, (Discussion)
public interfaces (see APIs)
public visibility
defined, (Encapsulation and Visibility)
purging
Cache_Lite cache, (How do I purge the Cache_Lite cache?)

Q

Query method
PDO database access, (Using the Query Method)

R

read function, (The DatabaseSession Class)
readCache function, (Solution)
readdir function, (Using the readdir Function)
readfile function, (Discussion), (Solution)
reading
local files, (How do I read a local file?)
realm
HTTP authentication, (Discussion)
redirecting
to another page, (How do I redirect users to another page following an error condition?)
refactoring
about, (Solution)
register_globals, (Turning register_globals Off), (Includes and Execution Settings)
registration forms
example of, (The Signup Page)
registration systems
building, (How do I build a registration system?)
relational databases
PHP support for, (Using Databases with PDO)
remote servers
accessing files on, (How do I access a file on a remote server?)
replace operations
advanced, (How do I perform advanced search and replace operations?)
report_memleaks, (Error-related Settings)
reporting, (Summary)
(see also error handling)
errors, (How do I log and report errors?)
repositories
layout, (Solution)
reusable PHP classes, (Alternatives to PEAR)
request headers, (Acting on the Browser’s Request Headers)
resellers
hosting services, (Is the host a reseller, or does it maintain servers itself?)
reserved words, (Setting Up the Database)
resetting
passwords, (The Reset Password Page)
resizing
images, (How do I resize images without stretching them?)
REST web services
consuming, (How can I consume REST services?)
serving, (How can I serve REST services?)
revision control software (RCS)
about, (How do I track revisions to my project’s code?)
RSS feeds
generating, (How do I generate an RSS feed?)
parsing, (How do I parse an RSS feed?)
rules (see validation rules)

S

safe_mode, (Is PHP Safe Mode disabled?)
SAX
parsing RSS feeds, (Discussion)
XML extension, (Solution)
scalar
strings, (Strings)
scheduling
batch jobs, (Does the host provide you access to cron, the Unix utility that allows you to schedule batch jobs?)
screening
web site visitors, (How do I build a registration system?)
scripts (see stored procedures)
handling incoming email, (Solution)
hosting policy, (What’s the hosting provider’s policy on running scripts and programs from the command line?)
search operations
advanced, (How do I perform advanced search and replace operations?)
searching
for nodes or content in XML, (How do I search for a node or content in XML?)
tables, (How do I search my table?)
security, (Security Checklist)
data transmission, (Access Control)
documentation about, (IV. Security)
email injection attacks, (How can I protect my site against email injection attacks?)
files, (Working with Files), (Discussion), (Discussion)
hiding code, (Discussion)
sessions, (Session Security)
settings, (Key Security and Portability Settings)
SELECT call
number of rows returned, (Counting the Rows Returned)
sending, (Summary)
(see also generating)
email to groups, (How do I mail a message to a group of people?)
HTML email, (How do I send HTML email?)
simple email, (How do I send a simple email?)
server-side caching
output buffering, (How do I use output buffering for server-side caching?)
using PEAR::Cache_Lite for, (How do I use PEAR::Cache_Lite for server-side caching?)
servers, (Summary)
(see also Apache web server; database servers; proxy servers; remote servers; web servers)
displaying errors, (How do I display errors and exceptions gracefully?)
overloading, (To what degree does the host “overload” the server?)
session files, (Session Security)
swapping, (Discussion)
services (see web services; XML)
session class, (How do I create a session class?)
session management
security, (Broken Authentication and Session Management)
session.save_path, (Miscellaneous Settings)
session.use_cookies, (Miscellaneous Settings)
session_regenerate_id function, (Broken Authentication and Session Management)
sessions
storing, (Discussion)
using, (Using PHP Sessions), (How do I use sessions?)
set_error_handler function, (Solution), (How do I implement a custom exception handler with PHP?), (Solution)
set_exception_handler function, (Solution)
settingAllowOverride, (Is the Apache settingAllowOverride set to Options or All?)
settings, (Key Security and Portability Settings)
configuration, (The Auth Class)
error handling, (What built-in settings does PHP offer for error handling?), (How do I implement a custom error handler with PHP?), (Error-related Settings)
includes and execution, (Includes and Execution Settings)
miscellaneous, (Miscellaneous Settings)
security and portability, (Key Security and Portability Settings)
short_open_tag, (Includes and Execution Settings)
SignUp class, (The SignUp Class)
signup page
creating, (The Signup Page)
silent mode
errors in SQL queries, (Using Silent Mode)
SimpleTest, (Solutions), (Discussion)
SimpleXML
parsing RSS feeds, (Solutions)
REST web services, (Solution)
XML extension, (Solution)
SOAP web services
consuming, (How can I consume SOAP web services?)
serving, (How do I serve SOAP web services?)
SOAP XML extension, (Solution)
SoapClient class, (Solution)
source code
outputting online, (How do I display PHP source code online?)
spam legislation
about, (Discussion)
SPL (Standard PHP Library)
using, (How do I work with files using the Standard PHP Library in PHP 5?)
sprintf function, (Solution)
dynamic SQL, (Discussion)
SQL, (How do I fetch data from a table?)
adding or modifying data in databases, (How do I add data to, or modify data in, my database?)
errors, (How do I resolve errors in my SQL queries?)
fetching data from tables, (How do I fetch data from a table?)
flexible SQL statements, (How do I create flexible SQL statements?)
rows affected by a query, (How do I find out how many rows I’ve touched?)
stored procedures, (How do I use stored procedures with PDO?)
SQL injection attacks
about, (Injection Flaws)
prepare and execute methods, (Discussion)
protecting from, (How do I protect my web site from an SQL injection attack?)
SSH
access to, (Does the host provide you with SSH access to the server?)
SSL
security, (Insecure Communications)
standards
coding, (Choosing a Coding Standard)
static methods
about, (Static Properties and Methods)
validating strings, (Solution)
static properties
about, (Static Properties and Methods)
stored procedures
cross-site scripting security exploit, (Discussion)
using with PDO, (How do I use stored procedures with PDO?)
storing
configuration information in files, (How do I store configuration information in a file?)
cryptographic data, (Insecure Cryptographic Storage)
dates in MySQL, (How do I store dates in MySQL?)
sessions elsewhere from server, (Discussion)
sessions in databases, (How do I store sessions in a database?)
str_replace function, (Solutions)
streams
accessing files, (Discussion)
string functions
using XML extension instead of, (Why should I use PHP’s XML extensions instead of PHP string functions?)
strings, (Strings)
breaking up text into arrays of lines, (How do I break up text into an array of lines?)
formatting, (How do I preserve formatting?)
outputting formatted text, (How do I output formatted text?)
outputting safely, (How do I output strings safely?)
reading files as, (Reading a File as a String)
search and replace, (How do I perform advanced search and replace operations?)
stripping HTML tags from text, (How do I strip HTML tags from text?)
treating objects as, (Treating an Object Like a String)
trimming white space, (How do I trim whitespace from text?)
validating submitted data, (How do I validate submitted data?)
wrapping text, (How do I force text to wrap after a certain number of characters?)
strip_quotes.php file, (Solution)
stripping
HTML tags from text, (How do I strip HTML tags from text?)
strtotime function, (Solution), (Solution), (Solution)
Structures_DataGrid class, (Solution)
Subversion (SVN), (Solution), (Discussion)
swapping
servers, (Discussion)
symlinks
deploying code, (Using Tags and Symlinks)
syntax errors
defined, (Error Handling)

T

tables
fetching data, (How do I fetch data from a table?)
outputting data, (How do I display data in a table?), (How do I display data in a sortable table?)
searching, (How do I search my table?)
tags
deploying code, (Using Tags and Symlinks)
revision control software, (Solution)
TAR files
creating, (How do I create compressed ZIP/TAR files with PHP?)
template caching
about, (What About Template Caching?)
ternary operators
reading files as arrays, (Reading a File as an Array)
Test Driven Development (TDD)
defined, (Discussion)
test environments, (Discussion)
test pages
permission systems, (The Permissions Test Page)
test suites
as documentation, (Discussion)
testing
code coverage, (How can I determine what remains to be tested?)
text
arrays of lines, (How do I break up text into an array of lines?)
outputting, (How do I output formatted text?)
trimming white space, (How do I trim whitespace from text?)
wrapping, (How do I force text to wrap after a certain number of characters?)
text watermarks
displaying, (Displaying a Text Watermark)
threaded multi-processing module (MPM)
hosting support, (Does the host support Linux and Apache?)
thumbnail galleries
creating, (How can I put together a simple thumbnail gallery?)
thumbnail images
creating, (How do I create thumbnail images?)
times (see dates and times)
timestamps (see MySQL timestamps; Unix timestamps)
tracking
code revisions, (How do I track revisions to my project’s code?)
transactions
databases, (How do I work with transactions?)
trigger_error function, (Solution)
triggering
errors, (How can I trigger PHP errors?)
trimming
white space from text, (How do I trim whitespace from text?)
TrueType fonts
JpGraph, (Creating a Bar Graph)
type hinting
about, (Aggregation)
types
data, (Strings)

U

Unix
session security, (Session Security)
Unix timestamps
using, (How do I use Unix timestamps?)
UPDATE function
data into databases, (UPDATE Data in the Database)
upgrades
hosting service policy, (Check the upgrade policy of your host.)
uptime command, (To what degree does the host “overload” the server?)
URLs
"pretty", (How do I make “pretty” URLs in PHP?)
access, (Failure to Restrict URL Access)
direct object reference attacks, (Insecure Direct Object Reference)
User class, (The User Class)
utilities (see cron utility; ZIP utility)

V

validation rules
forms, (Solution)
variable interpolation
strings, (Strings)
variables
constructing SQL statements, (How do I create flexible SQL statements?)
verification
of images by humans, (How do I create images that can be verified by humans only?)
versions
multiple code, (How can I maintain multiple versions of a single codebase?)
visibility
defined, (Encapsulation and Visibility)

W

warning mode
errors in SQL queries, (Using Warning Mode)
watermarks
adding to images, (How do I add a watermark to an image?)
web browsers, (Summary)
(see also Internet Explorer)
examining HTTP headers, (How do I examine HTTP headers in my browser?)
preventing from caching pages, (How do I prevent web browsers from caching a page?)
web hosting (see hosting)
web pages (see pages)
web servers, (Summary)
(see also Apache web server)
caching, (Caching)
preventing web browsers from caching pages, (How do I prevent web browsers from caching a page?)
web services, (Summary), (How can I consume XML-RPC web services?)
(see also XML)
consuming REST, (How can I consume REST services?)
consuming SOAP, (How can I consume SOAP web services?)
consuming XML-RPC services, (How can I consume XML-RPC web services?)
serving REST, (How can I serve REST services?)
serving SOAP, (How do I serve SOAP web services?)
serving XML-RPC, (How do I serve my own XML-RPC web services?)
week
day of, (How do I find a day of the week?)
WHERE clause
UPDATE and DELETE SQL commands, (Counting the Rows Affected)
whitespace
trimming, (How do I trim whitespace from text?)
wildcard characters
about, (Discussion)
Windows
dates, (Discussion)
MySQLDump class, (Catering to Platform Differences)
wordwrap function, (How do I force text to wrap after a certain number of characters?)
wrapper class, (How do I create a session class?)
wrapping
text, (How do I force text to wrap after a certain number of characters?)
write function, (The DatabaseSession Class)
writeCache function, (Solution)
WSDL
SOAP web services, (How can I consume SOAP web services?), (Discussion)

X

XDebug, (Solution)
XML, (XML and Web Services)
extensions, (Which XML technologies are available in PHP 5?)
generating RSS feeds, (How do I generate an RSS feed?)
parsing RSS feeds, (How do I parse an RSS feed?)
REST web services, (How can I consume REST services?)
searching for nodes or content, (How do I search for a node or content in XML?)
XML-RPC web services
consuming, (How can I consume XML-RPC web services?)
serving, (How do I serve my own XML-RPC web services?)
XML-RPC XML extension, (Solution)
XMLReader
parsing XML, (Parsing XML with XMLReader)
XMLReader class, (Solution)
xmlrpc_encode_request function, (PHP’s Native XML-RPC Extension)
XMLWriter class, (Solution)
generating XML, (Generating XML Using XMLWriter)
XPath
searching XML, (Solution)
XPath XML extension, (Solution)
XSL XML extension, (Solution)
XXS (see cross-site scripting)

Z

Zend Framework
coding standards, (Choosing a Coding Standard)
installing, (XML and Web Services)
REST web service, (Using the Zend Framework)
XML-RPC, (Solution)
Zend_Feed class
SimpleXML, (SimpleXML with Zend_Feed)
Zend_XmlRpc_Server class, (Solution), (PHP’s Native XML-RPC Extension)
ZIP utility
backing up databases, (Discussion)
creating files, (How do I create compressed ZIP/TAR files with PHP?)

SitePoint Books

  • advocate best practice techniques
  • lead you through practical examples
  • provide working code for your web site
  • make learning easy and fun

100% Money Back Guarantee