By Jack Herrington
First Edition
December 2005
Pages: 468
Series: Hacks
ISBN 10: 0-596-10139-2 |
ISBN 13: 9780596101398
![]()
![]()
![]()
![]()
(Average of 8 Customer Reviews)
This valuable guide offers both practical and fun PHP programming techniques. Learn to develop more robust PHP applications by improving your database design, automating application testing, and employing design patterns in your PHP scripts and classes. Image and application hacks explain how to create custom MP3 broadcasts, integrate with iTunes, and generate PDFs. Designed for all PHP programmers, from newcomers to experts.
Full Description
In PHP Hacks, author Jack Herrington wrings out his 20 years of code generation experience to deliver hands-on tools ranging from basic PHP and PEAR installation and scripting to advanced multimedia and database optimizing tricks.
On the practical side of things, PHP Hacks helps you develop more robust PHP applications by explaining how to improve your database design, automate application testing, and employ design patterns in your PHP scripts and classes. In the category of "cool," Herrington explains how to upgrade your Web interface through the creation of tabs, stickies, popups, and calendars. He even examines how to leverage maps and graphics in PHP. There's also a bounty of image and application hacks, including those that show you how to:
- Integrate web sites with Google maps and satellite imaging
- Dynamically display iPhoto libraries online
- Add IRC, SMS, and Instant Messaging capabilities to your Web applications
- Drop the latest Wikipedia dictionary onto your Sony PSP
- Render graphics and user interfaces with SVG, DHTML, and Ajax
Whether you're a newcomer or an expert, you'll find great value in PHP Hacks, the only PHP guide that offers something useful and fun for everyone.
Cover | Table of Contents | Colophon
Featured customer reviews
Big bug in cal2.php script, May 19 2007
I really loved this book as I am a php beginner. I'm also glad because I could debug a file :
If you get the scripts at http://examples.oreilly.com/phphks/
Look for cal2.php in cal directory, it was a review made by Alexander Naumann.
The calendar script works well except in one case :
when the first day of month is a sunday !
To debug, find :
# numeric weekday of the first day in
# the current monthz
$day = jddayofweek( $jd ) - 1;
and just add : if ($day<0){$day=6;}
Finally your file will look this way :
# numeric weekday of the first day in
# the current monthz
$day = jddayofweek( $jd ) - 1; if ($day<0){$day=6;}
Enjoy this great calendar !
Great book, May 06 2007
I really enjoyed this book, it gave great, useful examples that every PHP-based website can use.
But my favorite part was that he devoted an entire chapter to Design Patterns and how they are applied to PHP programming.
As an experienced programmer, but novice PHP user I really liked the approach and it got me up and running fast.
bugfixes in cal.php (calendar script), December 20 2006
I really like the calendar-script in 'PHP Hacks' (O'Reilly) in which I fill the daycells with information from a database. You can find the script with some necessary bugfixes in http://www.herrnaumann.de/downloads/cal.zip . The paging from year to year didn't work properly (at least not when I tried it). One variable was misspelled and one was not used at all.
The only thing which I changed in the view was that the weeks now start on Monday. In the download-file the old code is commented.
Have fun !
Chickenman
Download Coding.., October 03 2006
Under the title, 'Post-purchase benefits' there is a link called 'Examples', which lead to this URL:
http://examples.oreilly.com/phphks/
There are two files there. I downloaded the zip file and it contains the code. The other is likely to be identical, but using a different form of compression.
Download Coding.., August 21 2006
If it possible, where I can download the coding for this books?
Very nice!, July 29 2006
As a fan of the Hacks series, and as a fairly unexperienced PHP user, this book picked me up from the beginnings of PHP and dropped me off at the cutting edge, giving me the knowledge I yearned with a fun book through entertaining and often useful examples.
Stimulating -, February 26 2006
I have found much that is useful - it has opened my eyes to new possibilities.
Sadly, the source code for Hack #88 is not included in the handy archive.I recreated it from a file on the Oreilly German site, and compared it to the code in the book. There appears to be a problem with the function parseXML () - it dies and displays the error "could not open XML input"
Best PHP reference I have used, bar none., February 20 2006
Excellent PHP resource
I've read at least a dozen books on web development with PHP. This book is the best, by far!
The good:
- Excellent coverage of elegant PHP for dealing with databases and XML
- Outstanding explanation of automated code generation (a must for professional PHP developers)
- Description (and code implementation) of how to use design patterns with PHP. Former J2EE guys will love this.
- High quality prose and clear descriptions. I did not find any grammatical or spelling errors.
- Light sense of humor (without the unnecessary banter that one finds in most "... for Dummies" books)
The bad:
- Nothing.
As a software developer of 10 years, I give this book my highest recommendation.
Media reviews
"...PHP Hacks is a worthy title that offers explanations and source code for many valuable site-enhancing applications, testing and code generation techniques, and critical e-commerce safeguards. I recommend this book to any PHP developer who would like to add to their Web sites' capabilities, as well as their knowledge of what PHP can do. "
-- Michael J. Ross, Web Developer, Slashdot.org
"Looking through the list hacks you are bound to immediately find a couple that you'll be able to put to immediate use and others that will leave you wondering, 'Hmm, how could I take advantage of that?' The general writing and formatting style is explanatory, with Herrington providing an overview of the hack, an example, an explanation about how to use it, and useful tidbits about the hack. Like most hacks, the book itself can be useful by just about any level of programmer...Recommended."
-- Paul Schneider, PhD, Kickstart News
"Like the other titles in the Hacks series, this book contains a smattering of just about everything, but treats the reader to just enough information about each topic to serve as a springboard for further exploration on your own...Recommended for anyone who is interested in PHP, but needs a bit of a creative nudge to get started on some truly interesting projects. "
-- S. Patrick Eaton, Tokyo PC Users Group







