Acknowledgments |
|
xxiii | |
Introduction |
|
xxv | |
1 Building a Development Server |
|
1 | |
|
Windows XP, Windows Vista, and Windows 7 |
|
|
2 | |
|
Reinstalling Zend Server CE |
|
|
8 | |
|
|
8 | |
|
|
8 | |
|
|
8 | |
|
|
11 | |
|
|
12 | |
|
|
12 | |
|
|
14 | |
|
|
15 | |
|
|
16 | |
|
Fedora, RHEL, and CentOS Linux |
|
|
16 | |
|
|
16 | |
|
|
16 | |
|
|
17 | |
|
|
17 | |
|
|
17 | |
|
|
17 | |
|
|
17 | |
|
Mac OS X 10.4 Plus on Intel Chips |
|
|
18 | |
|
|
20 | |
|
|
21 | |
|
|
21 | |
|
|
24 | |
|
Configuring Error Handling in Zend Server CE |
|
|
25 | |
|
|
25 | |
2 Using the Plug-ins |
|
27 | |
|
|
28 | |
|
|
28 | |
|
|
29 | |
|
|
29 | |
|
|
29 | |
|
Correctly Inserting PHP code |
|
|
30 | |
|
|
31 | |
|
Including PHP Files from Other Servers |
|
|
32 | |
3 Text Processing |
|
33 | |
|
|
34 | |
|
|
35 | |
|
Variables, Arrays, and Functions |
|
|
35 | |
|
|
35 | |
|
|
36 | |
|
|
36 | |
|
|
37 | |
|
|
38 | |
|
Variables, Arrays, and Functions |
|
|
38 | |
|
|
38 | |
|
|
39 | |
|
|
39 | |
|
|
39 | |
|
|
40 | |
|
Variables, Arrays, and Functions |
|
|
40 | |
|
|
41 | |
|
|
42 | |
|
|
42 | |
|
Plug-in 4: Strip Whitespace |
|
|
43 | |
|
|
44 | |
|
Variables, Arrays, and Functions |
|
|
44 | |
|
|
44 | |
|
|
45 | |
|
|
45 | |
|
|
45 | |
|
|
46 | |
|
Variables, Arrays, and Functions |
|
|
46 | |
|
|
46 | |
|
|
46 | |
|
|
47 | |
|
|
47 | |
|
|
48 | |
|
Variables, Arrays, and Functions |
|
|
48 | |
|
|
48 | |
|
|
49 | |
|
|
49 | |
|
|
49 | |
|
|
50 | |
|
Variables, Arrays, and Functions |
|
|
50 | |
|
|
50 | |
|
|
51 | |
|
|
51 | |
|
|
51 | |
|
|
52 | |
|
Variables, Arrays, and Functions |
|
|
52 | |
|
|
52 | |
|
|
54 | |
|
|
54 | |
|
Plug-in 9: Remove Accents |
|
|
55 | |
|
|
56 | |
|
Variables, Arrays, and Functions |
|
|
56 | |
|
|
56 | |
|
|
56 | |
|
|
56 | |
|
|
57 | |
|
|
57 | |
|
Variables, Arrays, and Functions |
|
|
57 | |
|
|
57 | |
|
|
58 | |
|
|
58 | |
4 Image Handling |
|
59 | |
|
Installing the GD Library |
|
|
60 | |
|
|
60 | |
|
|
61 | |
|
Variables, Arrays, and Functions |
|
|
61 | |
|
|
61 | |
|
|
62 | |
|
|
64 | |
|
|
64 | |
|
|
65 | |
|
Variables, Arrays, and Functions |
|
|
65 | |
|
|
65 | |
|
|
65 | |
|
|
66 | |
|
Plug-in 13: Make Thumbnail |
|
|
66 | |
|
|
67 | |
|
Variables, Arrays, and Functions |
|
|
67 | |
|
|
67 | |
|
|
68 | |
|
|
68 | |
|
|
68 | |
|
|
69 | |
|
Variables, Arrays, and Functions |
|
|
70 | |
|
|
70 | |
|
|
70 | |
|
|
70 | |
|
|
71 | |
|
|
71 | |
|
Variables, Arrays, and Functions |
|
|
72 | |
|
|
72 | |
|
|
72 | |
|
|
73 | |
|
Plug-in 16: Image Enlarge |
|
|
73 | |
|
|
74 | |
|
Variables, Arrays, and Functions |
|
|
74 | |
|
|
75 | |
|
|
75 | |
|
|
75 | |
|
Plug-in 17: Image Display |
|
|
76 | |
|
|
76 | |
|
Variables, Arrays, and Functions |
|
|
77 | |
|
|
77 | |
|
|
77 | |
|
|
78 | |
|
Plug-in 18: Image Convert |
|
|
78 | |
|
|
79 | |
|
Variables, Arrays, and Functions |
|
|
79 | |
|
|
79 | |
|
|
79 | |
|
|
79 | |
|
|
80 | |
|
|
81 | |
|
Variables, Arrays, and Functions |
|
|
81 | |
|
|
81 | |
|
|
82 | |
|
|
82 | |
|
Plug-in 20: Image Watermark |
|
|
83 | |
|
|
83 | |
|
Variables, Arrays, and Functions |
|
|
84 | |
|
|
84 | |
|
|
85 | |
|
|
85 | |
5 Content Management |
|
87 | |
|
Plug-in 21: Relative to Absolute URL |
|
|
88 | |
|
|
89 | |
|
Variables, Arrays, and Functions |
|
|
89 | |
|
|
89 | |
|
|
90 | |
|
|
90 | |
|
Plug-in 22: Get Links from URL |
|
|
90 | |
|
|
91 | |
|
Variables, Arrays, and Functions |
|
|
91 | |
|
|
91 | |
|
|
92 | |
|
|
92 | |
|
|
92 | |
|
|
93 | |
|
Variables, Arrays, and Functions |
|
|
93 | |
|
|
93 | |
|
|
94 | |
|
|
94 | |
|
Plug-in 24: Directory List |
|
|
95 | |
|
|
96 | |
|
Variables, Arrays, and Functions |
|
|
96 | |
|
|
96 | |
|
|
97 | |
|
|
97 | |
|
Plug-in 25: Query Highlight |
|
|
98 | |
|
|
98 | |
|
Variables, Arrays, and Functions |
|
|
98 | |
|
|
98 | |
|
|
99 | |
|
|
100 | |
|
Plug-in 26: Rolling Copyright |
|
|
100 | |
|
|
101 | |
|
Variables, Arrays, and Functions |
|
|
101 | |
|
|
101 | |
|
|
101 | |
|
|
101 | |
|
Plug-in 27: Embed YouTube Video |
|
|
101 | |
|
|
101 | |
|
Variables, Arrays, and Functions |
|
|
102 | |
|
|
102 | |
|
|
102 | |
|
|
103 | |
|
|
103 | |
|
|
104 | |
|
Variables, Arrays, and Functions |
|
|
104 | |
|
|
104 | |
|
|
104 | |
|
|
105 | |
|
|
105 | |
|
|
105 | |
|
Variables, Arrays, and Functions |
|
|
105 | |
|
|
106 | |
|
|
106 | |
|
|
107 | |
|
|
108 | |
|
|
108 | |
|
Variables, Arrays, and Functions |
|
|
108 | |
|
|
108 | |
|
|
109 | |
|
|
109 | |
6 Forms and User Input |
|
111 | |
|
Plug-in 31: Evaluate Expression |
|
|
112 | |
|
|
112 | |
|
Variables, Arrays, and Functions |
|
|
112 | |
|
|
113 | |
|
|
114 | |
|
|
114 | |
|
Plug-in 32: Validate Credit Card |
|
|
114 | |
|
|
114 | |
|
Variables, Arrays, and Functions |
|
|
115 | |
|
|
115 | |
|
|
116 | |
|
|
116 | |
|
Plug-in 33: Create Captcha |
|
|
118 | |
|
|
118 | |
|
Variables, Arrays, and Functions |
|
|
119 | |
|
|
119 | |
|
|
120 | |
|
|
121 | |
|
Plug-in 34: Check Captcha |
|
|
122 | |
|
|
123 | |
|
Variables, Arrays, and Functions |
|
|
123 | |
|
|
123 | |
|
|
123 | |
|
|
124 | |
|
Plug-in 35: Validate Text |
|
|
124 | |
|
|
124 | |
|
Variables, Arrays, and Functions |
|
|
125 | |
|
|
125 | |
|
|
126 | |
|
|
127 | |
|
Plug-in 36: Validate E-mail |
|
|
128 | |
|
|
128 | |
|
Variables, Arrays, and Functions |
|
|
129 | |
|
|
129 | |
|
|
129 | |
|
|
129 | |
|
|
130 | |
|
|
130 | |
|
Variables, Arrays, and Functions |
|
|
130 | |
|
|
131 | |
|
|
131 | |
|
|
131 | |
|
|
131 | |
|
|
132 | |
|
Variables, Arrays, and Functions |
|
|
132 | |
|
|
132 | |
|
|
133 | |
|
|
133 | |
|
|
134 | |
|
|
134 | |
|
Variables, Arrays, and Functions |
|
|
135 | |
|
|
135 | |
|
|
135 | |
|
|
136 | |
|
|
137 | |
|
|
137 | |
|
Variables, Arrays, and Functions |
|
|
137 | |
|
|
137 | |
|
|
138 | |
|
|
139 | |
7 The Internet |
|
141 | |
|
|
142 | |
|
|
142 | |
|
Variables, Arrays, and Functions |
|
|
143 | |
|
|
143 | |
|
|
143 | |
|
|
144 | |
|
Plug-in 42: Get Title from URL |
|
|
144 | |
|
|
144 | |
|
Variables, Arrays, and Functions |
|
|
145 | |
|
|
145 | |
|
|
145 | |
|
|
145 | |
|
Plug-in 43: Auto Back Links |
|
|
145 | |
|
|
146 | |
|
Variables, Arrays, and Functions |
|
|
146 | |
|
|
146 | |
|
|
147 | |
|
|
147 | |
|
Plug-in 44: Create Short URL |
|
|
148 | |
|
|
148 | |
|
Variables, Arrays, and Functions |
|
|
149 | |
|
|
149 | |
|
|
150 | |
|
|
150 | |
|
Plug-in 45: Use Short URL |
|
|
151 | |
|
|
151 | |
|
Variables, Arrays, and Functions |
|
|
151 | |
|
|
152 | |
|
|
152 | |
|
|
153 | |
|
Plug-in 46: Simple Web Proxy |
|
|
154 | |
|
|
155 | |
|
Variables, Arrays, and Functions |
|
|
155 | |
|
|
155 | |
|
|
157 | |
|
|
158 | |
|
Plug-in 47: Page Updated? |
|
|
159 | |
|
|
160 | |
|
Variables, Arrays, and Functions |
|
|
160 | |
|
|
160 | |
|
|
161 | |
|
|
162 | |
|
|
163 | |
|
|
164 | |
|
Variables, Arrays, and Functions |
|
|
164 | |
|
|
164 | |
|
|
165 | |
|
|
166 | |
|
|
168 | |
|
|
168 | |
|
Variables, Arrays, and Functions |
|
|
169 | |
|
|
169 | |
|
|
169 | |
|
|
170 | |
|
Plug-in 50: HTML to Mobile |
|
|
170 | |
|
|
172 | |
|
Variables, Arrays, and Functions |
|
|
172 | |
|
|
172 | |
|
|
173 | |
|
|
173 | |
8 Chat and Messaging |
|
175 | |
|
|
176 | |
|
|
176 | |
|
Variables, Arrays, and Functions |
|
|
177 | |
|
|
177 | |
|
|
177 | |
|
|
178 | |
|
Plug-in 52: Post to Guestbook |
|
|
178 | |
|
|
178 | |
|
Variables, Arrays, and Functions |
|
|
179 | |
|
|
179 | |
|
|
180 | |
|
|
180 | |
|
Plug-in 53: Get Guestbook |
|
|
181 | |
|
|
181 | |
|
Variables, Arrays, and Functions |
|
|
181 | |
|
|
182 | |
|
|
182 | |
|
|
183 | |
|
|
183 | |
|
|
184 | |
|
Variables, Arrays, and Functions |
|
|
185 | |
|
|
185 | |
|
|
186 | |
|
|
188 | |
|
|
189 | |
|
|
190 | |
|
Variables, Arrays, and Functions |
|
|
190 | |
|
|
190 | |
|
|
192 | |
|
|
193 | |
|
|
194 | |
|
|
194 | |
|
Variables, Arrays, and Functions |
|
|
194 | |
|
|
195 | |
|
|
195 | |
|
|
196 | |
|
Plug-in 57: Send Direct Tweet |
|
|
196 | |
|
|
196 | |
|
Variables, Arrays, and Functions |
|
|
197 | |
|
|
197 | |
|
|
197 | |
|
|
197 | |
|
|
198 | |
|
|
198 | |
|
Variables, Arrays, and Functions |
|
|
199 | |
|
|
199 | |
|
|
199 | |
|
|
200 | |
|
Plug-in 59: Replace Smileys |
|
|
200 | |
|
|
201 | |
|
Variables, Arrays, and Functions |
|
|
201 | |
|
|
201 | |
|
|
201 | |
|
|
202 | |
|
Plug-in 60: Replace SMS Talk |
|
|
203 | |
|
|
203 | |
|
Variables, Arrays, and Functions |
|
|
204 | |
|
|
204 | |
|
|
204 | |
|
|
205 | |
9 MySQL, Sessions, and Cookies |
|
207 | |
|
Plug-in 61: Add User to DB |
|
|
208 | |
|
|
209 | |
|
Variables, Arrays, and Functions |
|
|
209 | |
|
|
209 | |
|
|
211 | |
|
|
214 | |
|
Plug-in 62: Get User from DB |
|
|
214 | |
|
|
215 | |
|
Variables, Arrays, and Functions |
|
|
215 | |
|
|
215 | |
|
|
215 | |
|
|
216 | |
|
Plug-in 63: Verify User in DB |
|
|
216 | |
|
|
217 | |
|
Variables, Arrays, and Functions |
|
|
217 | |
|
|
217 | |
|
|
217 | |
|
|
218 | |
|
Plug-in 64: Sanitize String and MySQL Sanitize String |
|
|
219 | |
|
|
219 | |
|
Variables, Arrays, and Functions |
|
|
219 | |
|
|
219 | |
|
|
220 | |
|
|
221 | |
|
Plug-in 65: Create Session |
|
|
221 | |
|
|
222 | |
|
Variables, Arrays, and Functions |
|
|
222 | |
|
|
222 | |
|
|
222 | |
|
|
223 | |
|
|
223 | |
|
|
224 | |
|
Variables, Arrays, and Functions |
|
|
224 | |
|
|
224 | |
|
|
224 | |
|
|
224 | |
|
Plug-in 67: Close Session |
|
|
225 | |
|
|
225 | |
|
Variables, Arrays, and Functions |
|
|
225 | |
|
|
225 | |
|
|
226 | |
|
|
226 | |
|
Plug-in 68: Secure Session |
|
|
226 | |
|
|
227 | |
|
Variables, Arrays, and Functions |
|
|
227 | |
|
|
227 | |
|
|
227 | |
|
|
228 | |
|
Plug-in 69: Manage Cookie |
|
|
228 | |
|
|
229 | |
|
Variables, Arrays, and Functions |
|
|
229 | |
|
|
229 | |
|
|
229 | |
|
|
230 | |
|
Plug-in 70: Block User by Cookie |
|
|
230 | |
|
|
231 | |
|
Variables, Arrays, and Functions |
|
|
231 | |
|
|
231 | |
|
|
232 | |
|
|
233 | |
10 APIs, RSS, and XML |
|
235 | |
|
Plug-in 71: Create Google Chart |
|
|
236 | |
|
|
237 | |
|
Variables, Arrays, and Functions |
|
|
237 | |
|
|
238 | |
|
|
239 | |
|
|
240 | |
|
Plug-in 72: Curl Get Contents |
|
|
241 | |
|
|
241 | |
|
Variables, Arrays, and Functions |
|
|
242 | |
|
|
242 | |
|
|
242 | |
|
|
242 | |
|
Plug-in 73: Fetch Wiki Page |
|
|
243 | |
|
|
244 | |
|
Variables, Arrays, and Functions |
|
|
244 | |
|
|
245 | |
|
|
247 | |
|
|
247 | |
|
Plug-in 74: Fetch Flickr Stream |
|
|
249 | |
|
|
249 | |
|
Variables, Arrays, and Functions |
|
|
249 | |
|
|
250 | |
|
|
251 | |
|
|
251 | |
|
Plug-in 75: Get Yahoo! Answers |
|
|
252 | |
|
|
252 | |
|
Variables, Arrays, and Functions |
|
|
253 | |
|
|
253 | |
|
|
254 | |
|
|
255 | |
|
Plug-in 76: Search Yahoo! |
|
|
256 | |
|
|
256 | |
|
Variables, Arrays, and Functions |
|
|
257 | |
|
|
257 | |
|
|
258 | |
|
|
259 | |
|
Plug-in 77: Get Yahoo! Stock News |
|
|
259 | |
|
|
260 | |
|
Variables, Arrays, and Functions |
|
|
261 | |
|
|
261 | |
|
|
262 | |
|
|
263 | |
|
Plug-in 78: Get Yahoo! News |
|
|
264 | |
|
|
265 | |
|
Variables, Arrays, and Functions |
|
|
265 | |
|
|
266 | |
|
|
266 | |
|
|
267 | |
|
Plug-in 79: Search Google Books |
|
|
268 | |
|
|
268 | |
|
Variables, Arrays, and Functions |
|
|
269 | |
|
|
270 | |
|
|
270 | |
|
|
272 | |
|
Plug-in 80: Convert Currency |
|
|
272 | |
|
|
273 | |
|
Variables, Arrays, and Functions |
|
|
274 | |
|
|
274 | |
|
|
275 | |
|
|
275 | |
11 Incorporating JavaScript |
|
277 | |
|
|
278 | |
|
|
279 | |
|
Variables, Arrays, and Functions |
|
|
279 | |
|
|
279 | |
|
|
279 | |
|
|
280 | |
|
Plug-in 82: Post Ajax Request |
|
|
280 | |
|
|
281 | |
|
Variables, Arrays, and Functions |
|
|
281 | |
|
|
281 | |
|
|
282 | |
|
|
284 | |
|
Plug-in 83: Get Ajax Request |
|
|
285 | |
|
|
285 | |
|
Variables, Arrays, and Functions |
|
|
285 | |
|
|
286 | |
|
|
286 | |
|
|
287 | |
|
Plug-in 84: Protect E-mail |
|
|
287 | |
|
|
287 | |
|
Variables, Arrays, and Functions |
|
|
288 | |
|
|
288 | |
|
|
289 | |
|
|
289 | |
|
|
290 | |
|
|
290 | |
|
Variables, Arrays, and Functions |
|
|
290 | |
|
|
291 | |
|
|
291 | |
|
|
292 | |
|
Plug-in 86: Status Message |
|
|
292 | |
|
|
293 | |
|
Variables, Arrays, and Functions |
|
|
293 | |
|
|
293 | |
|
|
293 | |
|
|
294 | |
|
|
295 | |
|
|
295 | |
|
Variables, Arrays, and Functions |
|
|
295 | |
|
|
296 | |
|
|
296 | |
|
|
297 | |
|
|
299 | |
|
|
299 | |
|
Variables, Arrays, and Functions |
|
|
300 | |
|
|
300 | |
|
|
301 | |
|
|
301 | |
|
Plug-in 89: Words from Root |
|
|
302 | |
|
|
303 | |
|
Variables, Arrays, and Functions |
|
|
303 | |
|
|
303 | |
|
|
303 | |
|
|
304 | |
|
|
304 | |
|
|
305 | |
|
Variables, Arrays, and Functions |
|
|
305 | |
|
|
305 | |
|
|
306 | |
|
|
306 | |
12 Diverse Solutions |
|
309 | |
|
Plug-in 91: Get Country by IP |
|
|
310 | |
|
|
310 | |
|
Variables, Arrays, and Functions |
|
|
310 | |
|
|
311 | |
|
|
311 | |
|
|
312 | |
|
Plug-in 92: Bypass Captcha |
|
|
312 | |
|
|
313 | |
|
Variables, Arrays, and Functions |
|
|
313 | |
|
|
313 | |
|
|
313 | |
|
|
314 | |
|
Plug-in 93: Get Book from ISBN |
|
|
314 | |
|
|
314 | |
|
Variables, Arrays, and Functions |
|
|
315 | |
|
|
315 | |
|
|
315 | |
|
|
315 | |
|
Plug-in 94: Get Amazon Sales Rank |
|
|
316 | |
|
|
316 | |
|
Variables, Arrays, and Functions |
|
|
317 | |
|
|
317 | |
|
|
317 | |
|
|
318 | |
|
Plug-in 95: Pattern Match Word |
|
|
318 | |
|
|
319 | |
|
Variables, Arrays, and Functions |
|
|
319 | |
|
|
319 | |
|
|
320 | |
|
|
320 | |
|
Plug-in 96: Suggest Spelling |
|
|
320 | |
|
|
320 | |
|
Variables, Arrays, and Functions |
|
|
321 | |
|
|
321 | |
|
|
322 | |
|
|
323 | |
|
Plug-in 97: Google Translate |
|
|
324 | |
|
|
324 | |
|
Variables, Arrays, and Functions |
|
|
325 | |
|
|
325 | |
|
|
325 | |
|
|
326 | |
|
|
327 | |
|
|
327 | |
|
Variables, Arrays, and Functions |
|
|
328 | |
|
|
328 | |
|
|
328 | |
|
|
329 | |
|
Plug-in 99: Rounded Table |
|
|
330 | |
|
|
331 | |
|
Variables, Arrays, and Functions |
|
|
331 | |
|
|
331 | |
|
|
331 | |
|
|
332 | |
|
Plug-in 100: Display Bing Map |
|
|
332 | |
|
|
333 | |
|
Variables, Arrays, and Functions |
|
|
333 | |
|
|
333 | |
|
|
333 | |
|
|
334 | |
Index |
|
335 | |