Apress Practical Web 2.0 Applications with PHP (2008).pdf

(6839 KB) Pobierz
The eXperT’s Voice ® in WeB DeVelopmenT
Practical
Web 2.0
Applications with PHP
Develop a complete PHP web application
from start to finish
Quentin Zervaas
993043690.051.png 993043690.062.png 993043690.073.png 993043690.084.png 993043690.001.png 993043690.008.png 993043690.009.png 993043690.010.png 993043690.011.png 993043690.012.png 993043690.013.png 993043690.014.png 993043690.015.png 993043690.016.png 993043690.017.png 993043690.018.png 993043690.019.png 993043690.020.png 993043690.021.png 993043690.022.png 993043690.023.png 993043690.024.png 993043690.025.png 993043690.026.png 993043690.027.png 993043690.028.png 993043690.029.png 993043690.030.png 993043690.031.png 993043690.032.png
 
993043690.033.png
 
993043690.034.png
 
993043690.035.png
 
993043690.036.png
 
993043690.037.png 993043690.038.png 993043690.039.png 993043690.040.png 993043690.041.png 993043690.042.png 993043690.043.png 993043690.044.png 993043690.045.png 993043690.046.png 993043690.047.png
 
993043690.048.png 993043690.049.png 993043690.050.png 993043690.052.png 993043690.053.png 993043690.054.png 993043690.055.png 993043690.056.png 993043690.057.png 993043690.058.png 993043690.059.png 993043690.060.png 993043690.061.png 993043690.063.png 993043690.064.png 993043690.065.png 993043690.066.png 993043690.067.png 993043690.068.png 993043690.069.png 993043690.070.png 993043690.071.png 993043690.072.png 993043690.074.png 993043690.075.png 993043690.076.png 993043690.077.png 993043690.078.png 993043690.079.png 993043690.080.png 993043690.081.png 993043690.082.png 993043690.083.png 993043690.085.png 993043690.086.png 993043690.087.png 993043690.088.png 993043690.089.png 993043690.090.png 993043690.091.png 993043690.092.png
 
Practical Web 2.0
Applications with PHP
Quentin Zervaas
993043690.093.png 993043690.002.png 993043690.003.png 993043690.004.png
Practical Web 2.0 Applications with PHP
Copyright © 2008 by Quentin Zervaas
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-906-8
ISBN-10 (pbk): 1-59059-906-3
ISBN-13 (electronic): 978-1-4302-0474-9
ISBN-10 (electronic): 1-4302-0474-5
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Ben Renow-Clarke
Technical Reviewer: Jeff Sambells
Editorial Board: Steve Anglin, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick,
Jason Gilmore, Kevin Goff, Jonathan Hassell, Matthew Moodie, Joseph Ottinger, Jeffrey Pepper,
Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Project Manager: Richard Dal Porto
Copy Editors: Andy Carroll, Kim Wimpsett
Assistant Production Director: Kari Brooks-Copony
Production Editor: Liz Berry
Compositor: Diana Van Winkle
Proofreader: Lisa Hamilton
Indexer: Broccoli Information Management
Artist: Diana Van Winkle
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders- ny@springer-sbm.com , or
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600,
Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any
person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by
the information contained in this work.
The source code for this book is available to readers at http://www.apress.com .
993043690.005.png
Contents at a Glance
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
CHAPTER 1
Application Planning and Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CHAPTER 2
Setting Up the Application Framework . . . . . . . . . . . . . . . . . . . . . . . . . . 9
CHAPTER 3
User Authentication, Authorization, and Management . . . . . . . . . . . . . 45
CHAPTER 4
User Registration, Login, and Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
CHAPTER 5
Introduction to Prototype and Scriptaculous . . . . . . . . . . . . . . . . . . 123
CHAPTER 6
Styling the Web Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
CHAPTER 7
Building the Blogging System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
CHAPTER 8
Extending the Blog Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
CHAPTER 9
Personalized User Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
CHAPTER 10
Implementing Web 2.0 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
CHAPTER 11
A Dynamic Image Gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
CHAPTER 12
Implementing Site Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
CHAPTER 13
Integrating Google Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
CHAPTER 14
Deployment and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
iii
 
993043690.006.png 993043690.007.png
 
Zgłoś jeśli naruszono regulamin