Book description
PHP is an easy-to-use scripting language perfect for quickly creating the Web features you need. Once you know the basics of how the language works, wouldn't it be great to have a collection of useful scripts that solve those tricky problems and add interesting functionality to your site? We thought so, too.
Instead of starting at "Hello World," Wicked Cool PHP assumes that you're familiar with the language and jumps right into the good stuff. After you learn the FAQs of life-the most commonly wished for PHP scripts-you'll work your way through smart configuration options and the art of forms, all the way through to complex database-backed scripts.
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text. The 76 easily implemented scripts will also teach you how to:
Send and receive email notifications
Track your visitors' behavior with cookies and sessions
Override PHP's default settings
Manipulate dates, images, and text on the fly
Harness SOAP and other web services
Create an online poll, ecard delivery system, and blog
But it's not all fun and games: Security is a big concern when programming any web application. So you'll learn how to encrypt your confidential data, safeguard your passwords, and prevent common cross-site-scripting attacks. And you'll learn how to customize all of the scripts to fit your own needs.
Dynamic Web content doesn't have to be difficult. Learn the secrets of the craft from two experienced PHP developers with Wicked Cool PHP.
Table of contents
-
Wicked Cool PHP
- WICKED COOL PHP.
- INTRODUCTION
-
1. THE FAQS OF LIFE—THE SCRIPTS EVERY PHP PROGRAMMER WANTS (OR NEEDS) TO KNOW
- #1: Including Another File as a Part of Your Script
- #2: Highlighting Alternate Row Colors in a Table
- #3: Creating Previous/Next Links
- #4: Printing the Contents of an Array
- #5: Turning an Array into a Nonarray Variable That Can Be Restored Later
- #6: Sorting Multidimensional Arrays
- #7: Templating Your Site with Smarty
-
2. CONFIGURING PHP
- Configuration Settings and the php.ini File
- #8: Revealing All of PHP's Settings
- #9: Reading an Individual Setting
- #10: Error Reporting
- #11: Suppressing All Error Messages
- #12: Extending the Run Time of a Script
- #13: Preventing Users from Uploading Large Files
- #14: Turning Off Registered Global Variables
- #15: Enabling Magic Quotes
- #16: Restricting the Files that PHP Can Access
- #17: Shutting Down Specific Functions
- #18: Adding Extensions to PHP
- 3. PHP SECURITY
-
4. WORKING WITH FORMS
- Security Measures: Forms Are Not Trustworthy
- Verification Strategies
- Using $_POST, $_GET, $_REQUEST, and $_FILES to Access Form Data
- #25: Fetching Form Variables Consistently and Safely
- #26: Trimming Excess Whitespace
- #27: Importing Form Variables into an Array
- #28: Making Sure a Response Is One of a Set of Given Values
- #29: Using Multiple Submit Buttons
- #30: Validating a Credit Card
- #31: Double-Checking a Credit Card's Expiration Date
- #32: Checking Valid Email Addresses
- #33: Checking American Phone Numbers
-
5. WORKING WITH TEXT AND HTML
- #34: Extracting Part of a String
- #35: Making a String Uppercase, Lowercase, or Capitalized
- #36: Finding Substrings
- #37: Replacing Substrings
- #38: Finding and Fixing Misspelled Words with pspell
- #39: Regular Expressions
- #40: Rearranging a Table
- #41: Creating a Screen Scraper
- #42: Converting Plaintext into HTML-Ready Markup
- #43: Automatically Hyperlinking URLs
- #44: Stripping HTML Tags from Strings
- 6. WORKING WITH DATES
- 7. WORKING WITH FILES
-
8. USER AND SESSION TRACKING
- Using Cookies and Sessions to Track User Data
- #56: Creating a "Welcome Back, Username!" Message with Cookies
- #57: Using Sessions to Temporarily Store Data
- #58: Checking to See If a User's Browser Accepts Cookies
- #59: Redirecting Users to Different Pages
- #60: Forcing a User to Use SSL-Encrypted Pages
- #61: Extracting Client Information
- #62: Session Timeouts
- #63: A Simple Login System
- 9. WORKING WITH EMAIL
- 10. WORKING WITH IMAGES
- 11. USING cURL TO INTERACT WITH WEB SERVICES
- 12. INTERMEDIATE PROJECTS
- A. APPENDIX
- About the Authors
- COLOPHON
Product information
- Title: Wicked Cool PHP
- Author(s):
- Release date: February 2008
- Publisher(s): No Starch Press
- ISBN: 9781593271732
You might also like
book
Wicked Cool Java
Wicked Cool Java contains 101 fun, interesting, and useful ways to get more out of Java. …
book
PHP 7: Real World Application Development
Use new features of PHP 7 to solve practical, real-world problems faced by PHP developers like …
book
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, Fifth Edition
Learn PHP and MySQL programming— the quick and easy way! Easy visual approach uses demonstrations and …
book
Wicked Cool Shell Scripts, 2nd Edition
Shell scripts are an efficient way to interact with your machine and manage your files and …