| Introduction |
|
1 | (6) |
|
|
|
7 | (32) |
|
|
|
8 | (1) |
|
Checking Usernames and Passwords |
|
|
9 | (2) |
|
Converting Strings into HTML |
|
|
11 | (2) |
|
|
|
13 | (1) |
|
|
|
14 | (2) |
|
|
|
16 | (3) |
|
|
|
19 | (1) |
|
Protecting Email Addresses Using ASCII Codes |
|
|
20 | (4) |
|
Scanning Formatted Strings |
|
|
24 | (1) |
|
Getting Detailed Information about Variables |
|
|
25 | (1) |
|
|
|
26 | (3) |
|
Using Perl-Compatible Regular Expressions |
|
|
29 | (1) |
|
Finding Tags with Regular Expressions |
|
|
30 | (1) |
|
Validating Mandatory Input |
|
|
31 | (3) |
|
Validating Email Addresses |
|
|
34 | (1) |
|
|
|
35 | (4) |
|
|
|
39 | (32) |
|
Accessing All Elements of Numeric Arrays |
|
|
41 | (2) |
|
Accessing All Elements of Associative Arrays |
|
|
43 | (1) |
|
Accessing All Array Elements in Nested Arrays |
|
|
44 | (3) |
|
Turning an Array into Variables |
|
|
47 | (1) |
|
Converting Strings to Arrays |
|
|
48 | (1) |
|
Converting Arrays to Strings |
|
|
49 | (1) |
|
Sorting Arrays Alphabetically |
|
|
50 | (1) |
|
Sorting Associative Arrays Alphabetically |
|
|
51 | (2) |
|
|
|
53 | (2) |
|
Sorting Nested Associative Arrays |
|
|
55 | (2) |
|
Sorting IP Addresses (as a Human Would) |
|
|
57 | (1) |
|
|
|
58 | (1) |
|
Sorting with Foreign Languages |
|
|
59 | (2) |
|
Applying an Effect to All Array Elements |
|
|
61 | (4) |
|
|
|
65 | (2) |
|
Getting Random Elements Out of Arrays |
|
|
67 | (1) |
|
Making Objects Behave Like Arrays |
|
|
68 | (3) |
|
|
|
71 | (28) |
|
|
|
74 | (1) |
|
Formatting DateTime Objects |
|
|
75 | (1) |
|
Automatically Localizing Dates |
|
|
75 | (4) |
|
Manually Localizing Dates |
|
|
79 | (1) |
|
Using the Current Date, the U.S./U.K./European Way |
|
|
80 | (1) |
|
Formatting a Specific Date |
|
|
80 | (2) |
|
|
|
82 | (1) |
|
Calculating a Relative Date |
|
|
83 | (1) |
|
Creating a Sortable Time Stamp |
|
|
84 | (1) |
|
Converting a String into a Date |
|
|
85 | (1) |
|
Determining Sunrise and Sunset |
|
|
86 | (1) |
|
Using Date and Time for Benchmarks |
|
|
87 | (2) |
|
Using Form Fields for Date Selection |
|
|
89 | (2) |
|
Create Self-Updating Form Fields for Date Selection |
|
|
91 | (2) |
|
Calculating the Difference between Two Dates |
|
|
93 | (3) |
|
Using GMT Date/Time Information |
|
|
96 | (3) |
|
4 Working with Objects (and Related Topics) |
|
|
99 | (24) |
|
|
|
100 | (2) |
|
Understanding Inheritance |
|
|
102 | (2) |
|
Using Abstract Classes and Interfaces |
|
|
104 | (4) |
|
Preventing Inheritance and Overwriting |
|
|
108 | (1) |
|
|
|
109 | (2) |
|
|
|
111 | (2) |
|
Serializing and Deserializing Objects |
|
|
113 | (2) |
|
|
|
115 | (5) |
|
|
|
120 | (3) |
|
5 Interacting with Web Forms |
|
|
123 | (40) |
|
Sending Form Data Back to the Current Script |
|
|
124 | (1) |
|
|
|
125 | (3) |
|
Checking Whether a Form Has Been Submitted |
|
|
128 | (1) |
|
Saving Form Data into a Cookie |
|
|
129 | (2) |
|
Prefilling Text Fields and Password Fields |
|
|
131 | (4) |
|
Prefilling Multiline Text Fields |
|
|
135 | (1) |
|
Preselecting Radio Buttons |
|
|
136 | (1) |
|
|
|
137 | (1) |
|
Preselecting Selection Lists |
|
|
138 | (2) |
|
Preselecting Multiple Selection Lists |
|
|
140 | (3) |
|
Processing Graphical Submit Buttons |
|
|
143 | (1) |
|
Checking Mandatory Fields |
|
|
144 | (2) |
|
|
|
146 | (3) |
|
|
|
149 | (1) |
|
|
|
150 | (1) |
|
Writing All Form Data into a File |
|
|
151 | (2) |
|
Sending All Form Data via Email |
|
|
153 | (1) |
|
Getting Information about File Uploads |
|
|
154 | (3) |
|
Moving Uploaded Files to a Safe Location |
|
|
157 | (1) |
|
Monitoring the Progress of a File Upload |
|
|
158 | (5) |
|
6 Remembering Users (Cookies and Sessions) |
|
|
163 | (38) |
|
|
|
164 | (3) |
|
|
|
167 | (2) |
|
|
|
169 | (1) |
|
Setting a (Reasonable) Expiry Date |
|
|
170 | (1) |
|
Setting a Client-Specific Expiry Date |
|
|
171 | (1) |
|
|
|
172 | (2) |
|
Making Cookies Accessible for Several Domains |
|
|
174 | (2) |
|
Checking Whether the Client Supports Cookies |
|
|
176 | (1) |
|
Saving Multiple Data in One Cookie |
|
|
177 | (3) |
|
Saving the User's Language Preference |
|
|
180 | (2) |
|
|
|
182 | (1) |
|
Where to Store the Sessions |
|
|
183 | (1) |
|
How to Maintain the Session State |
|
|
184 | (1) |
|
|
|
185 | (1) |
|
Reading and Writing Sessions |
|
|
186 | (1) |
|
|
|
187 | (1) |
|
|
|
187 | (2) |
|
Implementing a Custom Session Management |
|
|
189 | (6) |
|
Creating a Secured Area with Sessions |
|
|
195 | (2) |
|
Creating a Secured Area without Sessions |
|
|
197 | (4) |
|
7 Using Files on the Server File System |
|
|
201 | (28) |
|
Opening and Closing Files |
|
|
202 | (3) |
|
|
|
205 | (2) |
|
|
|
207 | (1) |
|
|
|
208 | (1) |
|
Using Relative Paths for File Access |
|
|
209 | (1) |
|
Avoiding Security Traps with File Access |
|
|
210 | (2) |
|
|
|
212 | (4) |
|
|
|
216 | (1) |
|
Retrieving File Information |
|
|
217 | (3) |
|
Copying, Moving, and Deleting Files |
|
|
220 | (1) |
|
|
|
221 | (1) |
|
|
|
222 | (2) |
|
|
|
224 | (3) |
|
Returning Files with an HTTP Request |
|
|
227 | (2) |
|
8 Working with MySQL Databases |
|
|
229 | (14) |
|
|
|
231 | (2) |
|
|
|
233 | (2) |
|
Prepared Statements with MySQL |
|
|
235 | (1) |
|
Retrieving Results of a Query to MySQL |
|
|
236 | (3) |
|
Retrieving the Last Inserted ID |
|
|
239 | (1) |
|
|
|
240 | (3) |
|
9 Working with Other Databases |
|
|
243 | (36) |
|
|
|
244 | (2) |
|
|
|
246 | (2) |
|
Retrieving Results of a Query to SQLite |
|
|
248 | (2) |
|
Using Prepared Statements with SQLite |
|
|
250 | (2) |
|
|
|
252 | (1) |
|
Sending SQL to PostgreSQL |
|
|
253 | (1) |
|
Updating Data in PostgreSQL |
|
|
254 | (1) |
|
Retrieving Results of a Query to PostgreSQL |
|
|
255 | (2) |
|
|
|
257 | (1) |
|
|
|
258 | (2) |
|
Retrieving Results of a Query to Oracle |
|
|
260 | (2) |
|
|
|
262 | (2) |
|
|
|
264 | (1) |
|
Retrieving Results of a Query to MSSQL |
|
|
265 | (1) |
|
Using Prepared Statements with MSSQL |
|
|
266 | (2) |
|
Using MSSQL without Windows |
|
|
268 | (2) |
|
|
|
270 | (1) |
|
|
|
271 | (1) |
|
Retrieving Results of a Query to Firebird |
|
|
272 | (1) |
|
|
|
273 | (2) |
|
|
|
275 | (1) |
|
Retrieving Results of a Query via PDO |
|
|
276 | (3) |
|
|
|
279 | (16) |
|
|
|
280 | (2) |
|
Parsing XML with XMLReader |
|
|
282 | (2) |
|
|
|
284 | (1) |
|
|
|
285 | (2) |
|
Using XMLWriter to Write XML |
|
|
287 | (1) |
|
|
|
288 | (1) |
|
Using XPath with SimpleXML |
|
|
289 | (1) |
|
Transforming XML with XSL |
|
|
290 | (1) |
|
|
|
291 | (4) |
|
11 Communicating with Others |
|
|
295 | (26) |
|
Connecting with HTTP Servers |
|
|
295 | (3) |
|
Connecting with FTP Servers |
|
|
298 | (2) |
|
Checking Whether a Server Is Still Reacting |
|
|
300 | (4) |
|
Creating a Web Service with NuSOAP |
|
|
304 | (2) |
|
Automatically Generating WSDL with NuSOAP |
|
|
306 | (2) |
|
Consuming a Web Service with NuSOAP |
|
|
308 | (1) |
|
Creating a Web Service with the PHP 5 SOAP Extension |
|
|
309 | (3) |
|
Consuming a Web Service with the PHP 5 SOAP Extension |
|
|
312 | (1) |
|
|
|
313 | (3) |
|
Exchanging Data with the Server |
|
|
316 | (5) |
| Index |
|
321 | |