PHP Cookbook, Second Edition
By Adam Trachtenberg, David Sklar
August 2006
Pages: 810
Series: Cookbooks
ISBN 10: 0-596-10101-5 |
ISBN 13: 9780596101015




(Average of 4 Customer Reviews)


Description
When it comes to creating dynamic web sites, the open source PHP language is red-hot property: used on more than 20 million web sites today, PHP is now more popular than Microsoft's ASP.NET technology. With our Cookbook's unique format, you can learn how to build dynamic web applications that work on any web browser. This revised new edition makes it easy to find specific solutions for programming challenges.
Full Description
When it comes to creating dynamic web sites, the open source PHP language is red-hot property: used on more than 20 million web sites today, PHP is now more popular than Microsoft's ASP.NET technology. With our Cookbook's unique format, you can learn how to build dynamic web applications that work on any web browser. This revised new edition makes it easy to find specific solutions for programming challenges.
PHP Cookbook has a wealth of solutions for problems that you'll face regularly. With topics that range from beginner questions to advanced web programming techniques, this guide contains practical examples -- or "recipes" -- for anyone who uses this scripting language to generate dynamic web content. Updated for PHP 5, this book provides solutions that explain how to use the new language features in detail, including the vastly improved object-oriented capabilities and the new PDO data access extension. New sections on classes and objects are included, along with new material on processing XML, building web services with PHP, and working with SOAP/REST architectures. With each recipe, the authors include a discussion that explains the logic and concepts underlying the solution.
Featured customer reviews

Great way to improve your PHP!,
April 24 2008
Submitted by
Leam
[
Respond |
View]
Each recipe states a
Problem, gives a
Solution, adds
Discussion to help you understand the "why" behind the "what", and tosses in a
See Also section if you need more info. There are 26 chapters of problem-solving recipes that will not only get you over the current hurdle but provide for learning in quick bits. Take a couple minutes, try something that interests you, and add it to your toolbox.
Awesome book!
Must have for all PHP programmers.,
May 14 2007
Submitted by Anonymous Reader [
Respond |
View]
I find most technical books impossible to read from front to back. I typically just use them as reference books. Unfortuanately most techbooks aren't organized with this in mind. That's why I love the cookbook series. They tend to contain far more example code then typical programming books and are ideal reference books. The PHP Cookbook is an excellent resouce for PHP novices and experts alike. PHP Cookbook (2nd Edition) is exactly what you would expect from a O'Reilly's cookbook. Everyone reguardless of skill level will feel they hit the jackpot with this book because it has tons of sample code and examples that explain how to do just about anything imaginable in PHP.
The chapters are organized according to topic and each subsection is basicly a short how-to comprised of a problem, solution and disscussion section that explains the solution in detail. Topics include XML, form handling, database interaction, session management and a lot more. I find all O'Reilly's cookbooks to be extremely useful and PHP Cookbook is ceartainly the most useful PHP book I own.
A must have for PHP programmers,
December 27 2006
Submitted by
Jason
[
Respond |
View]
This is my first O’Reilly book in the “Cookbook” series. At first I thought this book would probably contain the code and instructions for building a couple of web applications such as a shopping cart or a blog engine. This isn’t that book. Rather it provides the reader with code snippets that can be used as building blocks for all kinds of applications. If I had to describe this book in one sentence I would say it is as if the author took down all the “Hmm…, I wonder how that is done?” questions and created an answer key.
One thing I like about this book is that the authors don’t waste the first few chapters trying to teach or give an overview of the language. Instead they hop right into the usage of the language that relates to real world stuff.
So here is a brief overview. The book covers PHP 5 and goes over many of the new and improved features. The first six chapters provide recipes for more basic subjects (strings, numbers, dates & times, arrays, variables, and functions. Again, this isn’t an intro to PHP, that is another book such as Programming PHP from O’Reilly. This is that book you reach for once you have moved from PHP basics and are ready to build some real world stuff.
By chapter seven the authors are discussing classes and objects. I like using classes when coding in C++, so this is a good chapter for those who like OOP. The next nine chapters go over web stuff starting out with basic things like cookies, forms, and databases. Then the authors go into more advanced areas like session management, XML, automation and web services (REST, SOAP, Mail, FTP, LDAP, and DNS to name a few).
The next chapter [17] is on the topic of graphics. This is a cool chapter if you like to create dynamic images. Things like creating a button image on the fly, or generating charts. Graphics are great to have a knowledge of because everyone likes graphical presentation of data and this chapter can help you get there.
Chapter 18 is on security and encryption which I found rather helpful. No one wants there web application to be the link that allows data to be compromised, and this chapter deals with many of those problem areas. Chapter 19 covers localization, chapter 20 is on debugging and testing. The debugging section does a great job of getting a person setup with the tools they need to properly debug an application including creating your own exception class. This is an outstanding chapter that every programmer can appreciate since every application needs debugging.
The remaining chapters cover performance tuning, regular expressions, files, directories, command line PHP, PERL and PECL. Being a Perl guy I found it interesting to see how the authors utilized regular expressions in PHP. And the chapter on command-line PHP was outstanding; I thought the recipe for creating a PHP command shell was pretty cool.
CONCLUSION
--
This book is like having the answer key to most of the random questions a person comes up with when writing code. I found this book to be very useful, it will be one of those references that I keep close, and gets very little shelf time. It is a solid book. It is hard to say what parts I liked best because this is one of those books that you like and must have, but then as time goes on and you use it more and more its value grows. This is an excellent book and I would strongly recommend it the PHP users that want to move to the next level.
Read all reviews
marvellous book,
September 02 2006
Submitted by
Nimasdj
[
Respond |
View]
I had a basic knowledge of php but after finding this book I got a better knowledge of php. You don't need to know php before reading this book. This book is defintely good for both beginners and professionals. This book works both as teach book and as reference book. definitely recommended for everybody who want to learn or work with php programming. I appreciate the time the authors put to write this great book. I look forward to see more books from authors.
Media reviews
"In my experience as a web developer, there have been many times when I would have a task to preform but wasnt exactly sure how best to handle it
a book like this allows you to flip around and find what you need...If you are a PHP programmer, I know this is a book you probably should have sitting on your desk."
-- Stefan Mischook,
KIllersites.com
"
PHP Cookbook is a programmer's book written by programmers. It's a no nonsense book that belongs at the fingertips of most PHP programmers for those, 'how do I do that?' moments. While the book could be a good workbook for learning PHP, I don't know that I would recommend that to completely new programmers. But for veterans of other languages, this book may well be the stepping stone to functional PHP skills in a very short time frame."
-- Taran Rampersad,
KnowProSE.com
"PHP is among the most popular Web scripting language available today. It is estimated that it is used on more than twenty million sites, providing interactivity via its capability to converse with several different database applications. The authors provide more than 250 PHP recipes covering a wide variety of topics that are of interest to PHP programmers. This handy reference will likely save programmers hours of work since the recipes can often be used with little modification."
-- Michael Kleper, The Kleper Report on Digital Publishing
Read all reviews