Muutke küpsiste eelistusi

Plug-In PHP: 100 Power Solutions [Pehme köide]

  • Formaat: Paperback / softback, 384 pages, kõrgus x laius x paksus: 234x188x19 mm, kaal: 635 g, 100 Illustrations
  • Ilmumisaeg: 16-Apr-2010
  • Kirjastus: Osborne/McGraw-Hill
  • ISBN-10: 0071666591
  • ISBN-13: 9780071666596
Teised raamatud teemal:
  • Formaat: Paperback / softback, 384 pages, kõrgus x laius x paksus: 234x188x19 mm, kaal: 635 g, 100 Illustrations
  • Ilmumisaeg: 16-Apr-2010
  • Kirjastus: Osborne/McGraw-Hill
  • ISBN-10: 0071666591
  • ISBN-13: 9780071666596
Teised raamatud teemal:
Publisher's Note: Products purchased from Third Party sellers are not guaranteed by the publisher for quality, authenticity, or access to any online entitlements included with the product.

100 power solutions to real-world problems

This practical guide gives you 100 ready-to-run PHP functions for solving most of the main problems you encounter when building a dynamic website with PHP. Every plug-in in the book offers a complete and working solution for a result you can achieve right away, using ready-made code you simply drop into your own program. And theres little or no learning curve, because each one is self-contained and thoroughly documented.

Plug-in PHP is packed with programming tips and suggestions for further adapting the functions to your own needs, and even breaks down all the variables, arrays and functions used by each into at-a-glance tables, accompanied by a screen grab of every function in action. This makes the book extremely easy to use, even for complete beginners to PHP programming.

A plug-in for every need No matter what cookbook-style solutions youre looking for, youll find the perfect functions in this book, and you can have them up and running in just a couple of minutes. For example, heres the complete list of plug-ins which, while comprehensive, simply doesn't do justice to the depth and breadth of help, information, and practical code provided in this book: Wrap Text; Caps Control; Friendly Text; Strip Whitespace; Word Selector; Count Tail; Text Truncate; Spell Check; Remove Accents; Shorten Text; Upload File; Resize Image; Make Thumbnail; Image Alter; Image Crop; Image Enlarge; Image Display; Image Convert; GIF Text; Image Watermark; Relative to Absolute URL; Get Links from URL; Check Links; Directory List; Query Highlight; Rolling Copyright; Embed YouTube Video; Create List; Hit Counter; Referer Log; Evaluate Expression; Validate Credit Card; Create Captcha; Check Captcha; Validate Text; Validate E-mail; Spam Catch; Send E-mail; BB Code; Pound Code; Check Links; Get Title from URL; Auto Back Links; Create Short URL; Use Short URL; Simple Web Proxy; Page Updated ; HTML to RSS; RSS to HTML; HTML to Mobile; Users Online; Post to Guestbook; Get Guestbook; Post to Chat; View Chat; Send Tweet; Send Direct Tweet; Get Tweets; Replace Smileys; Replace SMS Talk; Add User to DB; Get User from DB; Verify User in DB; Sanitize String; Create Session; Open Session; Close Session; Secure Session; Manage Cookie; Block User by Cookie; Create Google Chart; Curl Get Contents; Fetch Wiki Page; Fetch Flickr Stream; Get Yahoo! Answers; Search Yahoo!; Get Yahoo! Stock News; Get Yahoo! News; Search Google Books; Convert Currency; Ajax Request; Post Ajax Request; Get Ajax Request; Protect E-mail; Toggle Text; Status Message; Slide Show; Input Prompt; Words from Root; Predict Word; Get Country by IP; Bypass Captcha; Get Book from ISBN; Get Amazon Sales Rank; Pattern Match Word; Suggest Spelling; Google Translate; Corner GIF; Rounded Table; Display Bing Map

Real world solutions Plug-in PHP has everything you need for processing text; image uploading and manipulation; content management; forms and user input; integrating your website with others; creating chat and messaging services; using MySQL; managing sessions and cookies; dealing with APIs; RSS; and XML; integrating with JavaScript and Ajax; accessing geo-location; spell checking and language translation; and a great deal more.

Written by PHP expert with many years of experience developing websites in PHP and writing about PHP development, this invaluable resource draws on the authors personal toolkit of solutions built up over the years. This means they are fast, tried-and-tested functions that have been proven to work in the real world, and they will work for you too.
Acknowledgments xxiii
Introduction xxv
1 Building a Development Server 1
Windows XP, Windows Vista, and Windows 7
2
Reinstalling Zend Server CE
8
Upgrading Zend Server CE
8
Windows Security Alerts
8
After Installation
8
Uninstalling
11
Document Root
12
Ubuntu and Debian Linux
12
Uninstalling
14
After Installation
15
Document Root
16
Fedora, RHEL, and CentOS Linux
16
Installing MySQL
16
Uninstalling
16
Document Root
17
Other Versions of Linux
17
Installing MySQL
17
Uninstalling
17
Document Root
17
Mac OS X 10.4 Plus on Intel Chips
18
Document Root
20
Uninstalling
21
Mac OS X 10.3
21
Document Root
24
Configuring Error Handling in Zend Server CE
25
And Now You're Set to Go
25
2 Using the Plug-ins 27
Using include
28
include_once
28
Using require
29
require_once
29
Include Scope
29
Correctly Inserting PHP code
30
Inserting HTML
31
Including PHP Files from Other Servers
32
3 Text Processing 33
Plug-in 1: Wrap Text
34
About the Plug-in
35
Variables, Arrays, and Functions
35
How It Works
35
How to Use It
36
The Plug-in
36
Plug-in 2: Caps Control
37
About the Plug-in
38
Variables, Arrays, and Functions
38
How It Works
38
How to Use It
39
The Plug-in
39
Plug-in 3: Friendly Text
39
About the Plug-in
40
Variables, Arrays, and Functions
40
How It Works
41
How to Use It
42
The Plug-in
42
Plug-in 4: Strip Whitespace
43
About the Plug-in
44
Variables, Arrays, and Functions
44
How It Works
44
How to Use It
45
The Plug-in
45
Plug-in 5: Word Selector
45
About the Plug-in
46
Variables, Arrays, and Functions
46
How It Works
46
How to Use It
46
The Plug-in
47
Plug-in 6: Count Tail
47
About the Plug-in
48
Variables, Arrays, and Functions
48
How It Works
48
How to Use It
49
The Plug-in
49
Plug-in 7: Text Truncate
49
About the Plug-in
50
Variables, Arrays, and Functions
50
How It Works
50
How to Use It
51
The Plug-in
51
Plug-in 8: Spell Check
51
About the Plug-in
52
Variables, Arrays, and Functions
52
How It Works
52
How to Use It
54
The Plug-in
54
Plug-in 9: Remove Accents
55
About the Plug-in
56
Variables, Arrays, and Functions
56
How It Works
56
How to Use It
56
The Plug-in
56
Plug-in 10: Shorten Text
57
About the Plug-in
57
Variables, Arrays, and Functions
57
How It Works
57
How to Use It
58
The Plug-in
58
4 Image Handling 59
Installing the GD Library
60
Plug-in 11: Upload File
60
About the Plug-in
61
Variables, Arrays, and Functions
61
How It Works
61
How to Use It
62
The Plug-in
64
Plug-in 12: Resize Image
64
About the Plug-in
65
Variables, Arrays, and Functions
65
How It Works
65
How to Use It
65
The Plug-in
66
Plug-in 13: Make Thumbnail
66
About the Plug-in
67
Variables, Arrays, and Functions
67
How It Works
67
How to Use It
68
The Plug-in
68
Plug-in 14: Image Alter
68
About the Plug-in
69
Variables, Arrays, and Functions
70
How It Works
70
How to Use It
70
The Plug-in
70
Plug-in 15: Image Crop
71
About the Plug-in
71
Variables, Arrays, and Functions
72
How It Works
72
How to Use It
72
The Plug-in
73
Plug-in 16: Image Enlarge
73
About the Plug-in
74
Variables, Arrays, and Functions
74
How It Works
75
How to Use It
75
The Plug-in
75
Plug-in 17: Image Display
76
About the Plug-in
76
Variables, Arrays, and Functions
77
How It Works '
77
How to Use It
77
The Plug-in
78
Plug-in 18: Image Convert
78
About the Plug-in
79
Variables, Arrays, and Functions
79
How It Works
79
How to Use It
79
The Plug-in
79
Plug-in 19: Gif Text
80
About the Plug-in
81
Variables, Arrays, and Functions
81
How It Works
81
How to Use It
82
The Plug-in
82
Plug-in 20: Image Watermark
83
About the Plug-in
83
Variables, Arrays, and Functions
84
How It Works
84
How to Use It
85
The Plug-in
85
5 Content Management 87
Plug-in 21: Relative to Absolute URL
88
About the Plug-in
89
Variables, Arrays, and Functions
89
How It Works
89
How to Use It
90
The Plug-in
90
Plug-in 22: Get Links from URL
90
About the Plug-in
91
Variables, Arrays, and Functions
91
How It Works
91
How to Use It
92
The Plug-in
92
Plug-in 23: Check Links
92
About the Plug-in
93
Variables, Arrays, and Functions
93
How It Works
93
How to Use It
94
The Plug-in
94
Plug-in 24: Directory List
95
About the Plug-in
96
Variables, Arrays, and Functions
96
How It Works
96
How to Use It
97
The Plug-in
97
Plug-in 25: Query Highlight
98
About the Plug-in
98
Variables, Arrays, and Functions
98
How It Works
98
How to Use It
99
The Plug-in
100
Plug-in 26: Rolling Copyright
100
About the Plug-in
101
Variables, Arrays, and Functions
101
How It Works
101
How to Use It
101
The Plug-in
101
Plug-in 27: Embed YouTube Video
101
About the Plug-in
101
Variables, Arrays, and Functions
102
How It Works
102
How to Use It
102
The Plug-in
103
Plug-in 28: Create List
103
About the Plug-in
104
Variables, Arrays, and Functions
104
How It Works
104
How to Use It
104
The Plug-in
105
Plug-in 29: Hit Counter
105
About the Plug-in
105
Variables, Arrays, and Functions
105
How It Works
106
How to Use It
106
The Plug-in
107
Plug-in 30: Referer Log
108
About the Plug-in
108
Variables, Arrays, and Functions
108
How It Works
108
How to Use It
109
The Plug-in
109
6 Forms and User Input 111
Plug-in 31: Evaluate Expression
112
About the Plug-in
112
Variables, Arrays, and Functions
112
How It Works
113
How to Use It
114
The Plug-in
114
Plug-in 32: Validate Credit Card
114
About the Plug-in
114
Variables, Arrays, and Functions
115
How It Works
115
How to Use It
116
The Plug-in
116
Plug-in 33: Create Captcha
118
About the Plug-in
118
Variables, Arrays, and Functions
119
How It Works
119
How to Use It
120
The Plug-in
121
Plug-in 34: Check Captcha
122
About the Plug-in
123
Variables, Arrays, and Functions
123
How It Works
123
How to Use It
123
The Plug-in
124
Plug-in 35: Validate Text
124
About the Plug-in
124
Variables, Arrays, and Functions
125
How It Works
125
How to Use It
126
The Plug-in
127
Plug-in 36: Validate E-mail
128
About the Plug-in
128
Variables, Arrays, and Functions
129
How It Works
129
How to Use It
129
The Plug-in
129
Plug-in 37: Spain Catch
130
About the Plug-in
130
Variables, Arrays, and Functions
130
How It Works
131
How to Use It
131
The Plug-in
131
Plug-in 38: Send E-mail
131
About the Plug-in
132
Variables, Arrays, and Functions
132
How It Works
132
How to Use It
133
The Plug-in
133
Plug-in 39: BB Code
134
About the Plug-in
134
Variables, Arrays, and Functions
135
How It Works
135
How to Use It
135
The Plug-in
136
Plug-in 40: Pound Code
137
About the Plug-in
137
Variables, Arrays, and Functions
137
How It Works
137
How to Use It
138
The Plug-in
139
7 The Internet 141
Plug-in 41: Check Links
142
About the Plug-in
142
Variables, Arrays, and Functions
143
How It Works
143
How to Use It
143
The Plug-in
144
Plug-in 42: Get Title from URL
144
About the Plug-in
144
Variables, Arrays, and Functions
145
How It Works
145
How to Use It
145
The Plug-in
145
Plug-in 43: Auto Back Links
145
About the Plug-in
146
Variables, Arrays, and Functions
146
How It Works
146
How to Use It
147
The Plug-in
147
Plug-in 44: Create Short URL
148
About the Plug-in
148
Variables, Arrays, and Functions
149
How It Works
149
How to Use It
150
The Plug-in
150
Plug-in 45: Use Short URL
151
About the Plug-in
151
Variables, Arrays, and Functions
151
How It Works
152
How to Use It
152
The Plug-in
153
Plug-in 46: Simple Web Proxy
154
About the Plug-in
155
Variables, Arrays, and Functions
155
How It Works
155
How to Use It
157
The Plug-in
158
Plug-in 47: Page Updated?
159
About the Plug-in
160
Variables, Arrays, and Functions
160
How It Works
160
How to Use It
161
The Plug-in
162
Plug-in 48: HTML To RSS
163
About the Plug-in
164
Variables, Arrays, and Functions
164
How It Works
164
How to Use It
165
The Plug-in
166
Plug-in 49: RSS to HTML
168
About the Plug-in
168
Variables, Arrays, and Functions
169
How It Works
169
How to Use It
169
The Plug-in
170
Plug-in 50: HTML to Mobile
170
About the Plug-in
172
Variables, Arrays, and Functions
172
How It Works
172
How to Use It
173
The Plug-in
173
8 Chat and Messaging 175
Plug-in 51: Users Online
176
About the Plug-in
176
Variables, Arrays, and Functions
177
How It Works
177
How to Use It
177
The Plug-in
178
Plug-in 52: Post to Guestbook
178
About the Plug-in
178
Variables, Arrays, and Functions
179
How It Works
179
How to Use It
180
The Plug-in
180
Plug-in 53: Get Guestbook
181
About the Plug-in
181
Variables, Arrays, and Functions
181
How It Works
182
How to Use It
182
The Plug-in
183
Plug-in 54: Post to Chat
183
About the Plug-in
184
Variables, Arrays, and Functions
185
How It Works
185
How to Use It
186
The Plug-in
188
Plug-in 55: View Chat
189
About the Plug-in
190
Variables, Arrays, and Functions
190
How It Works
190
How to Use It
192
The Plug-in
193
Plug-in 56: Send Tweet
194
About the Plug-in
194
Variables, Arrays, and Functions
194
How It Works
195
How to Use It
195
The Plug-in
196
Plug-in 57: Send Direct Tweet
196
About the Plug-in
196
Variables, Arrays, and Functions
197
How It Works
197
How to Use It
197
The Plug-in
197
Plug-in 58: Get Tweets
198
About the Plug-in
198
Variables, Arrays, and Functions
199
How It Works
199
How to Use It
199
The Plug-in
200
Plug-in 59: Replace Smileys
200
About the Plug-in
201
Variables, Arrays, and Functions
201
How It Works
201
How to Use It
201
The Plug-in
202
Plug-in 60: Replace SMS Talk
203
About the Plug-in
203
Variables, Arrays, and Functions
204
How It Works
204
How to Use It
204
The Plug-in
205
9 MySQL, Sessions, and Cookies 207
Plug-in 61: Add User to DB
208
About the Plug-in
209
Variables, Arrays, and Functions
209
How It Works
209
How to Use It
211
The Plug-in
214
Plug-in 62: Get User from DB
214
About the Plug-in
215
Variables, Arrays, and Functions
215
How It Works
215
How to Use It
215
The Plug-in
216
Plug-in 63: Verify User in DB
216
About the Plug-in
217
Variables, Arrays, and Functions
217
How It Works
217
How to Use It
217
The Plug-in
218
Plug-in 64: Sanitize String and MySQL Sanitize String
219
About the Plug-ins
219
Variables, Arrays, and Functions
219
How They Work
219
How to Use Them
220
The Plug-ins
221
Plug-in 65: Create Session
221
About the Plug-in
222
Variables, Arrays, and Functions
222
How It Works
222
How to Use It
222
The Plug-in
223
Plug-in 66: Open Session
223
About the Plug-in
224
Variables, Arrays, and Functions
224
How It Works
224
How to Use It
224
The Plug-in
224
Plug-in 67: Close Session
225
About the Plug-in
225
Variables, Arrays, and Functions
225
How It Works
225
How to Use It
226
The Plug-in
226
Plug-in 68: Secure Session
226
About the Plug-in
227
Variables, Arrays, and Functions
227
How It Works
227
How to Use It
227
The Plug-in
228
Plug-in 69: Manage Cookie
228
About the Plug-in
229
Variables, Arrays, and Functions
229
How It Works
229
How to Use It
229
The Plug-in
230
Plug-in 70: Block User by Cookie
230
About the Plug-in
231
Variables, Arrays, and Functions
231
How It Works
231
How to Use It
232
The Plug-in
233
10 APIs, RSS, and XML 235
Plug-in 71: Create Google Chart
236
About the Plug-in
237
Variables, Arrays, and Functions
237
How It Works
238
How to Use It
239
The Plug-in
240
Plug-in 72: Curl Get Contents
241
About the Plug-in
241
Variables, Arrays, and Functions
242
How It Works
242
How to Use It
242
The Plug-in
242
Plug-in 73: Fetch Wiki Page
243
About the Plug-in
244
Variables, Arrays, and Functions
244
How It Works
245
How to Use it
247
The Plug-in
247
Plug-in 74: Fetch Flickr Stream
249
About the Plug-in
249
Variables, Arrays, and Functions
249
How It Works
250
How to Use It
251
The Plug-in
251
Plug-in 75: Get Yahoo! Answers
252
About the Plug-in
252
Variables, Arrays, and Functions
253
How It Works
253
How to Use It
254
The Plug-in
255
Plug-in 76: Search Yahoo!
256
About the Plug-in
256
Variables, Arrays, and Functions
257
How It Works
257
How to Use It
258
The Plug-in
259
Plug-in 77: Get Yahoo! Stock News
259
About the Plug-in
260
Variables, Arrays, and Functions
261
How It Works
261
How to Use It
262
The Plug-in
263
Plug-in 78: Get Yahoo! News
264
About the Plug-in
265
Variables, Arrays, and Functions
265
How It Works
266
How to Use It
266
The Plug-in
267
Plug-in 79: Search Google Books
268
About the Plug-in
268
Variables, Arrays, and Functions
269
How It Works
270
How to Use It
270
The Plug-in
272
Plug-in 80: Convert Currency
272
About the Plug-in
273
Variables, Arrays, and Functions
274
How It Works
274
How to Use It
275
The Plug-in
275
11 Incorporating JavaScript 277
Plug-in 81: Ajax Request
278
About the Plug-in
279
Variables, Arrays, and Functions
279
How It Works
279
How to Use It
279
The Plug-in
280
Plug-in 82: Post Ajax Request
280
About the Plug-in
281
Variables, Arrays, and Functions
281
How It Works
281
How to Use It
282
The Plug-in
284
Plug-in 83: Get Ajax Request
285
About the Plug-in
285
Variables, Arrays, and Functions
285
How It Works
286
How to Use It
286
The Plug-in
287
Plug-in 84: Protect E-mail
287
About the Plug-in
287
Variables, Arrays, and Functions
288
How It Works
288
How to Use It
289
The Plug-in
289
Plug-in 85: Toggle Text
290
About the Plug-in
290
Variables, Arrays, and Functions
290
How It Works
291
How to Use It
291
The Plug-in
292
Plug-in 86: Status Message
292
About the Plug-in
293
Variables, Arrays, and Functions
293
How It Works
293
How to Use It
293
The Plug-in
294
Plug-in 87: Slide Show
295
About the Plug-in
295
Variables, Arrays, and Functions
295
How It Works
296
How to Use It
296
The Plug-in
297
Plug-in 88: Input Prompt
299
About the Plug-in
299
Variables, Arrays, and Functions
300
How It Works
300
How to Use It
301
The Plug-in
301
Plug-in 89: Words from Root
302
About the Plug-in
303
Variables, Arrays, and Functions
303
How It Works
303
How to Use It
303
The Plug-in
304
Plug-in 90: Predict Word
304
About the Plug-in
305
Variables, Arrays, and Functions
305
How It Works
305
How to Use It
306
The Plug-in
306
12 Diverse Solutions 309
Plug-in 91: Get Country by IP
310
About the Plug-in
310
Variables, Arrays, and Functions
310
How it Works
311
How to Use It
311
The Plug-in
312
Plug-in 92: Bypass Captcha
312
About the Plug-in
313
Variables, Arrays, and Functions
313
How It Works
313
How to Use It
313
The Plug-in
314
Plug-in 93: Get Book from ISBN
314
About the Plug-in
314
Variables, Arrays, and Functions
315
How It Works
315
How to Use It
315
The Plug-in
315
Plug-in 94: Get Amazon Sales Rank
316
About the Plug-in
316
Variables, Arrays, and Functions
317
How It Works
317
How to Use It
317
The Plug-in
318
Plug-in 95: Pattern Match Word
318
About the Plug-in
319
Variables, Arrays, and Functions
319
How It Works
319
How to Use It
320
The Plug-in
320
Plug-in 96: Suggest Spelling
320
About the Plug-in
320
Variables, Arrays, and Functions
321
How It Works
321
How to Use It
322
The Plug-in
323
Plug-in 97: Google Translate
324
About the Plug-in
324
Variables, Arrays, and Functions
325
How It Works
325
How to Use It
325
The Plug-in
326
Plug-in 98: Corner Gif
327
About the Plug-in
327
Variables, Arrays, and Functions
328
How It Works
328
How to Use It
328
The Plug-in
329
Plug-in 99: Rounded Table
330
About the Plug-in
331
Variables, Arrays, and Functions
331
How It Works
331
How to Use It
331
The Plug-in
332
Plug-in 100: Display Bing Map
332
About the Plug-in
333
Variables, Arrays, and Functions
333
How It Works
333
How to Use It
333
The Plug-in
334
Index 335
Robin Nixon (Kent, UK) is an experienced author, teacher, and programmer with over 30 years experience. Nixon has produced over 500 articles and 20 books, including best-selling titles on PHP/MySQL, HTML, JavaScript, and other Web development topics.