Sunday, March 14, 2010

Essential PHP Security [Chris Shiflett]


Being highly flexible in building dynamic, database-driven web applications makes the PHP programming language one of the most popular web development tools in use today. It also works beautifully with other open source tools, such as the MySQL database and the Apache web server. However, as more web sites are developed in PHP, they become targets for malicious attackers, and developers need to prepare for the attacks.

Security is an issue that demands attention, given the growing frequency of attacks on web sites. Essential PHP Security explains the most common types of attacks and how to write code that isn't susceptible to them. By examining specific attacks and the techniques used to protect against them, you will have a deeper understanding and appreciation of the safeguards you are about to learn in this book.

In the much-needed (and highly-requested) Essential PHP Security, each chapter covers an aspect of a web application (such as form processing, database programming, session management, and authentication). Chapters describe potential attacks with examples and then explain techniques to help you prevent those attacks.

Topics covered include:
  • Preventing cross-site scripting (XSS) vulnerabilities
  • Protecting against SQL injection attacks
  • Complicating session hijacking attempts


Saturday, March 13, 2010

Building Tag Clouds in Perl and PHP

Tag clouds are everywhere on the web these days. First popularized by the web sites Flickr, Technorati, and del.icio.us, these amorphous clumps of words now appear on a slew of web sites as visual evidence of their membership in the elite corps of "Web 2.0." This PDF analyzes what is and isn't a tag cloud, offers design tips for using them effectively, and then goes on to show how to collect tags and display them in the tag cloud format. Scripts are provided in Perl and PHP.

Yes, some have said tag clouds are a fad. But as you will see, tag clouds, when used properly, have real merits. More importantly, the skills you learn in making your own tag clouds enable you to make other interesting kinds of interfaces that will outlast the mercurial fads of this year or the next.

Over the past few decades, digital technologies have dramatically increased ourability to store, organize, and access information. Today, I can instantly answer allkinds of questions that would have stumped me 20 years ago, and I have access toa wealth of words, sounds, and imagesfar more than I have the intellectualcapacity to consume. You could say we're in the midst of an informationexplosion, but I like to think we're being served an information cornucopia.

The abundance of this information is ever increasing, and the user interfaces webuilt ten years ago to access and organize it are starting to show signs of strain andwear, like a rickety folding table supporting the weight of a thousand pies.

Tag clouds are just one of a new crop of interfaces that aim to ease this strain.There are others, which succeed to greater and lesser degrees, and there will bebetter ones to come. I hope to have a part in making some of them, and I hope youdo too.

TABLE OF CONTENT:
  • Tag Clouds: Ephemeral or Enduring?
  • Weighted Lists
  • Some History
  • Design Tips for Building Tag Clouds
  • Making Tag Clouds in Perl
  • Making Tag Clouds in PHP

PHP 5 Power Programming [Andi Gutmans, Stig Bakken, Derick Rethans]


In the book PHP 5 Power Programming [Andi Gutmans, Stig Bakken, Derick Rethans], PHP 5's co-creator and two leading PHP developers show you how to make the most of PHP 5's industrial-strength enhancements in any project—no matter how large or complex. Their unique insights and realistic examples illuminate PHP 5's new object model, powerful design patterns, improved XML Web services support, and much more. Whether you're creating web applications, extensions, packages, or shell scripts—or migrating PHP 4 code—here are high-powered solutions you won't find anywhere else.
Review PHP's syntax and master its object-oriented capabilities—from properties and methods to polymorphism, interfaces, and reflection
  • Master the four most important design patterns for PHP development
  • Write powerful web applications: handle input, cookies, session extension, and more
  • Integrate with MySQL, SQLite, and other database engines
  • Provide efficient error handling that's transparent to your users
  • Leverage PHP 5's improved XML support—including parsing, XSLT conversions, and more
  • Build XML-based web services with XML-RPC and SOAP
  • Make the most of PEAR: work with the repository, use key packages, and create your own
  • Upgrade PHP 4 code to PHP 5—compatibility issues, techniques, and practical workarounds
  • Improve script performance: tips and tools for PHP optimization
  • Use PHP extensions to handle files/streams, regular expressions, dates/times, and graphics
  • Create original extensions and shell scripts
If you're a software developer new to PHP, you'll leap quickly into PHP and its new object-oriented capabilities. If you're an experienced PHP programmer, you already recognize PHP's convenience and simplicity. Now, discover all of its extraordinary power!

Programming PHP [Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre]

Programming PHP [Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre], is the authoritative guide to PHP 5 and is filled with the unique knowledge of the creator of PHP (Rasmus Lerdorf) and other PHP experts. When it comes to creating websites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million websites, surpassing Microsoft's ASP .NET technology in popularity. Programmers love its flexibility and speed; designers love its accessibility and convenience.
As the industry standard book on PHP, all of the essentials are covered in a clear and concise manner. Language syntax and programming techniques are coupled with numerous examples that illustrate both correct usage and common idioms. With style tips and practical programming advice, this book will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP, Second Edition covers everything you need to know to create effective web applications with PHP. Contents include:
  • Detailed information on the basics of the PHP language, including data types, variables, operators, and flow control statements
  • Chapters outlining the basics of functions, strings, arrays, and objects
  • Coverage of common PHP web application techniques, such as form processing and validation, session tracking, and cookies
  • Material on interacting with relational databases, such as MySQL and Oracle, using the database-independent PEAR DB library and the new PDO Library
  • Chapters that show you how to generate dynamic images, create PDF files, and parse XML files with PHP
  • Advanced topics, such as creating secure scripts, error handling, performance tuning, and writing your own C language extensions to PHP
  • A handy quick reference to all the core functions in PHP and all the standard extensions that ship with PHP

Thursday, March 11, 2010

Programming PHP [Rasmus Lerdorf, Kevin Tatroe, and Peter MacIntyre]

Programming PHP [Rasmus Lerdorf, Kevin Tatroe, and Peter MacIntyre] is the authoritative guide to PHP 5 and is filled with the unique knowledge of the creator of PHP (Rasmus Lerdorf) and other PHP experts. When it comes to creating websites, the PHP scripting language is truly a red-hot property. In fact, PHP is currently used on more than 19 million websites, surpassing Microsoft's ASP .NET technology in popularity. Programmers love its flexibility and speed; designers love its accessibility and convenience.
As the industry standard book on PHP, all of the essentials are covered in a clear and concise manner. Language syntax and programming techniques are coupled with numerous examples that illustrate both correct usage and common idioms. With style tips and practical programming advice, this book will help you become not just a PHP programmer, but a good PHP programmer. Programming PHP, Second Edition covers everything you need to know to create effective web applications with PHP. Contents include:
  • Detailed information on the basics of the PHP language, including data types, variables, operators, and flow control statements
  • Chapters outlining the basics of functions, strings, arrays, and objects
  • Coverage of common PHP web application techniques, such as form processing and validation, session tracking, and cookies
  • Material on interacting with relational databases, such as MySQL and Oracle, using the database-independent PEAR DB library and the new PDO Library
  • Chapters that show you how to generate dynamic images, create PDF files, and parse XML files with PHP
  • Advanced topics, such as creating secure scripts, error handling, performance tuning, and writing your own C language extensions to PHP
  • A handy quick reference to all the core functions in PHP and all the standard extensions that ship with PHP

PHP Cookbook: Solutions and Examples for PHP Programmers [Adam Trachtenberg, Adam Trachtenberg]

PHP Cookbook: Solutions and Examples for PHP Programmers [Adam Trachtenberg, Adam Trachtenberg] is one of the best guide for PHP programmer. 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.

How to Do Everything with PHP and MySQL [Vikram Vaswani]

How to Do Everything with PHP and MySQL [Vikram Vaswani] is a great book for someone who knows little about MySQL and PHP and wants to quickly get on with producing some database driven dynamic web pages. Oraclehome.co.uk 20050805

This new release in the popular How to Do Everything series explains how to build open source web applications with MySQL and PHP 5. Using these two tools, you’ll be able to create highly functional, interactive web sites easily. Follow along with a step-by-step sample application and, as a bonus, download three full-length case studies complete with code trees.

PHP 5 for Dummies

PHP 5 for Dummies [Janet Valade]
covers the latest major release of PHP, the most popular open source Web scripting language, in the friendly, easy-to-understand For Dummies style (1) PHP is installed on nearly nine million servers, and usage has grown at the rate of 6.5 percent per month for the past two years, (2) PHP is easy to learn, well suited for Web development, and can be embedded with HTML, making it a good choice for creating dynamic Web pages for e-commerce sites and other Web applications; a database-friendly language, it connects easily to Sybase, MySQL, mSQL, Oracle, and other databases. (3) Explains how to acquire and install PHP, how PHP's features make it a useful scripting language, and how to use PHP for three of the most common applications: interactive Web sites, database storage, and common operating system tasks.


Start programming PHP and make your Web site interactive, Discover arrays of variables, start writing scripts, and get object oriented.The script calls for an interactive Web site --; where do you start? Right here, with a fast and friendly way to get the hang of PHP 5 programming! You’ll also discover all the other cool things you can do with PHP, like managing files, interacting with databases, using system commands, and more.

Book1



Monday, March 1, 2010

PHP Solutions: Dynamic Web Design Made Easy [David Powers]


In the book PHP Solutions: Dynamic Web Design Made Easy [David Powers], you'll learn how to:
  • Create dynamic websites with design and usability in mind, as well as functionality
  • Understand how PHP scripts work, giving you confidence to adapt them to your own needs
  • Bring online forms to life, check required fields, and ensure user input is safe to process
  • Upload files and automatically create thumbnails from larger images
  • Manage website content with a searchable database
You want to make your websites more dynamic by adding a feedback form, creating a private area where members can upload images that are automatically resized, or perhaps storing all your content in a database. The problem is, you're not a programmer and the thought of writing code sends a chill up your spine. Or maybe you've dabbled a bit in PHP and MySQL, but you can't get past baby steps. If this describes you, then you've just found the right book. PHP and the MySQL database are deservedly the most popular combination for creating dynamic websites. They're free, easy to use, and provided by many web hosting companies in their standard packages. Unfortunately, most PHP books either expect you to be an expert already or force you to go through endless exercises of little practical value. In contrast, this book gives you real value right away through a series of practical examples that you can incorporate directly into your sites, optimizing performance and adding functionality such as file uploading, email feedback forms, image galleries, content management systems, and much more. Each solution is created with not only functionality in mind, but also visual design. But this book doesn't just provide a collection of ready-made scripts: each PHP Solution builds on what's gone before, teaching you the basics of PHP and database design quickly and painlessly. By the end of the book, you'll have the confidence to start writing your own scripts or—if you prefer to leave that task to othersto adapt existing scripts to your own requirements. Right from the start, you're shown how easy it is to protect your sites by adopting secure coding practices. The book has been written with an eye on forward and backward compatibilityrecommending the latest PHP 5 techniques, but providing alternative solutions for servers still running PHP 4.3. All database examples demonstrate how to use the original MySQL extension, MySQL Improved, or the PHP Data Objects (PDO) introduced in PHP 5.1, letting you choose the most suitable option for your setup. Summary of Contents:
  • Chapter 1: What Is PHPAnd Why Should I Care?
  • Chapter 2: Getting Ready to Work with PHP
  • Chapter 3: How to Write PHP Scripts
  • Chapter 4: Lightening Your Workload with Includes
  • Chapter 5: Bringing Forms to Life
  • Chapter 6: Uploading Files
  • Chapter 7: Using PHP to Manage Files
  • Chapter 8: Generating Thumbnail Images
  • Chapter 9: Pages That Remember: Simple Login and Multipage Forms
  • Chapter 10: Setting Up MySQL and phpMyAdmin
  • Chapter 11: Getting Started with a Database
  • Chapter 12: Creating a Dynamic Online Gallery
  • Chapter 13: Managing Content
  • Chapter 14: Solutions to Common PHP/MySQL Problems
  • Chapter 15: Keeping Intruders at Bay