PHP Programming with PEAR
XML, Data, Dates, Web Services, and Web APIs
Maximize your PHP development productivity by
mastering the PEAR packages for accessing and
displaying data, handling dates, working with XML and
Web Services, and accessing Web APIs
Stephan Schmidt
Carsten Lucke
Stoyan Stefanov
Aaron Wormus
BIRMINGHAM - MUMBAI
PHP Programming with PEAR
XML, Data, Dates, Web Services, and Web APIs
Copyright © 2006 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2006
Production Reference: 1160906
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 1-904811-79-5
www.packtpub.com
Cover Image by www.visionwt.com
Credits
Authors
Stephan Schmidt
Carsten Lucke
Stoyan Stefanov
Aaron Wormus
Reviewers
Lukas Smith
Shu-Wai Chow
Arnaud Limbourg
Development Editor
Douglas Paterson
Assistant Development Editor
Nikhil Bangera
Technical Editor
Ashutosh Pande
Editorial Manager
Dipali Chittar
Indexer
Mithil Kulkarni
Proofreader
Chris Smith
Layouts and Illustrations
Shantanu Zagade
Cover Designer
Shantanu Zagade
About the Authors
Stephan Schmidt is working for 1&1 Internet, the world’s largest web hosting
provider in Karlsruhe. He is leading a team of PHP and Java programmers and
focusses on the development of the websites and online ordering systems of 1&1.
He has been an active contributor to the PHP open source scene since 2001, when
he founded the PHP Application Tools website (http://www.php-tools.net)
together with some friends, which today is one of the oldest PHP OSS projects. He
has also been working on more than 15 PEAR packages (with a focus on XML and
web services), as well as the id3 extension. Recently he started the XJConf project
(http://www.xjconf.net) and also contributes to the Java community.
He is the author of the (German language) PHP Design Patterns (O'Reilly Verlag,
ISBN 3-89721-442-3) as well as a co-author of several other books on PHP and
has been writing articles for several magazines. He has also spoken at various
open-source conferences around the globe.
He devotes his spare time to American super-hero comics and the golden 50s.
Carsten Lucke studied computer science at the University of Applied Sciences
in Brandenburg, Germany. He is currently working as a software engineer for the
software design and management AG (sd&m AG) in Munich, Germany.
In his spare time he writes articles for various magazines and contributes to the
open-source community (especially PHP). He is the developer of a handful of PEAR/
PECL packages, founder of the 3rdPEARty pear channel-server project (3rdpearty.
net) and the tool-garage.de open-source and freeware project.
Stoyan Stefanov is a web developer from Montreal, Canada, Zend Certied
Engineer, book author, and contributor to the international PHP community. His
personal blog is at http://www.phpied.com.
I would like to thank Tom Kouri and the team at High-Touch
Communications in Montreal; special thanks to Derek Fong for
introducing me to PEAR and to Michael Caplan for always being up
to speed with the latest PEAR development.