News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
The Basics of Implementing Adapter Objects with PHP
December 06, 2006 @ 15:53:59

DevShed takes a look at another of the design patterns in a new series starting with this new tutorial - a look at the implementation of Adapter objects in PHP.

You may have already encountered situations in coding PHP applications in which you would like to use inheritance, but could not for one reason or another. Fortunately, there is an alternative for these situations that can help you achieve the same result. In this first article in a two-part series, you'll learn about the adapter pattern.

They start off with the basics of the Adapter pattern and move quickly into the first definition of a class using them - a directory processor. Once that's built, they show how it all works with a more practical example.

0 comments voice your opinion now!
adapter design pattern object tutorial part1 basics directory processor adapter design pattern object tutorial part1 basics directory processor


DevShed:
Completing a Blogger with PHP
December 05, 2006 @ 11:38:00

DevShed caps off another series with this new tutorial today, ending their look at creating a blogging engine in PHP.

Welcome to the concluding installment of the series "Building a blogger with PHP." Made up of three friendly articles, this series provides you with all the information you need to start building a blog system with PHP in a few easy steps.

They look at their blogProcessor class first, including adding the needed database functionality to it. Then it's back out to the client side for the input forms and some validation before adding some style and formatting to the layout of the pages to make it a bit easier to use.

0 comments voice your opinion now!
blogger application engine database processor validation form appearance blogger application engine database processor validation form appearance


ZD Net Asia:
Keep your options open with FTP file uploads
June 23, 2006 @ 13:51:26

On the ZD Net Asia site today, there's a quick look at using the FTP functionality that can be compiled into PHP to create a method to upload files.

Take file upload, for example. Sure, you can do it the traditional way, using HTTP file upload and transferring the file directly to a location on your Web server's disk. Or you can do it the more exotic way, and use the FTP protocol to upload in a two-step process: from your local disk to a Web server, and then to an FTP server.

Reams have already been written about HTTP file upload, which is why this brief tutorial focuses on FTP-based file uploads instead (in the example that follows, though, you'll see both in action). Note that this tutorial assumes that you have a working PHP/Apache installation, with both HTTP file upload and FTP functions active.

They have three steps for you to take to get their example up and working:

  • checking that you have the access rights to get on the server
  • creating an upload form
  • code the PHP upload processor

The form and PHP code are provided, so there's no reason to worry on that count. The biggest issue is whether or not you have the FTP support compiled into your PHP installation. From there, it's just a few simple function calls away from pushing the uploaded files contents out to a remote server.

0 comments voice your opinion now!
ftp functionality compiledupload tutorial html form processor ftp functionality compiledupload tutorial html form processor


DevShed:
Completing a Query Processor in PHP
May 31, 2006 @ 14:32:28

DevShed finishes off their "Creating a Query Processor" series, a look at working with sockets and related functions, in part three, a focus on extending the class even further and some more in-depth looks "under the hood".

Welcome to the third part of the series "Network Programming in PHP." In three tutorials, this series explains the basics of network programming in PHP, by developing a query processor class in PHP 5, which uses some of the most popular PHP network functions, in order to implement the logic of its methods.

In this last article of the series, I'll add some extra methods to the query processor class, which can be used for performing the networking operations that I mentioned before. Of course, I'll implement within all the methods an easy-to-grasp programming logic, so you shouldn't have any problems understanding how each method works.

He starts with a brief look back to see how far the script's come before charging ahead into even more expansion. He fleshes out the getMXRecords and checkDNSRecords methods before adding in come TCP service functions - scanPort and getWhois. Finally, he wraps it all back into the class and takes one last look at the entire creation (and a simple example that checks the DNS and scans ports for the host "google.com".

0 comments voice your opinion now!
query processor network functionality part3 tutorial query processor network functionality part3 tutorial


DevShed:
Adding Methods to the Query Processor in PHP
May 24, 2006 @ 12:15:43

DevShed has posted the second part of their "Network Programming in PHP" series today - this time, they enhance the QueryProcessor class they've developed with even more functionality.

At this point I guess that all the networking PHP built-in functions that I covered in the first article, such as the "gethostbyaddr()", "gethostbyname()", "gethostbynamel()" functions are already familiar to you. So now I will explain what new things you'll learn in this second article of the series. Since I want to continue expanding the "QueryProcessor" class that I coded previously, this installment will focus on adding more methods to it, by using other useful PHP network functions, aimed particularly at running popular Windows networking applications, like "ipconfig," "netstat" and more.

If you didn't get a change to check out part one, it's definitely suggested that you do so before you start on this section. As mentioned, they're going to show you how to add other functionality to the class, including the ability to ping another server, check the current machine's network settings, perform a "netstat" command, and get the MX records for a hostname. At the end, they stick it all together in the complete (so far) class for easy cut and paste.

0 comments voice your opinion now!
part2 network functions query processor part2 network functions query processor


DevShed:
Build a Query Processor Class for Networking in PHP 5 (Part 1)
May 18, 2006 @ 06:02:27

DevShed starts up a new series of tutorials today with this article, a look at how to build a query processor class for networking with PHP.

The networking query application that I plan to build will be encapsulated within a single PHP 5 class, but you can easily modify its complete source code in order to work with PHP 4. As I said before, this application should be considered a practical introduction to using many PHP built-in functions included in the corresponding PHP network library, so if you want to learn how to use these functions, this series might help you to start quickly including them in your own applications.

The app gives examples of converting hostnames to IP addresses (and back), defining two of the service methods in the class, and plugging them into a working example. It basically still only does the hostname/IP converstions, but it also lists out the services and which ports their on.

0 comments voice your opinion now!
query processor class networking php5 part1 query processor class networking php5 part1


DevShed:
Working with Multiple Template Files to Separate Logic from Presentation (Part 3)
May 17, 2006 @ 06:07:46

Wrapping up their series on "Seperating logic from presentation", DevShed has posted this final article capping off the creation of a simple template parser in PHP5.

By returning to the subject of this last installment, I'll use the skeleton of the original "TemplateProcessor" class to develop an improved, production-level template processor, which, as you'll see in a few moments, will be capable of working with multiple template files, in addition to implementing a chunked caching system. In this way, the class will be able to use several templates that have distinct cache expiration times, aside from utilizing most of the template processing features that you learned before.

If you haven't read up on them yet, go back and check out part one and part two of the series to catch up. They'll give you the foundation to build from - not just the code but the concepts as well. This third part demonstrates chunked caching of your templates/pages as well as pulling in more than one template file at a time. Throw that all together with the functionality from before and you have an extensible, simple template parsing class they use in a bit more concrete example.

0 comments voice your opinion now!
tutorial template processor seperate logic presentation tutorial template processor seperate logic presentation


DevShed:
Building a PHP 5 Form Processor - Using the Form Processor Package
January 31, 2006 @ 07:12:23

DevShed has posted the next part in their "Building a PHP 5 Form Processor" series today - "Using the Form Processor Package" - a look at how to use the class created in the previous two parts to make useful, powerful forms.

Now, before proceeding further, let's spend a few minutes discussing the objectives of this last tutorial, so you can have an accurate idea of how I'll use this form processing library. Basically, I'll set up an example, in order to demonstrate the functionality of both modules within a real application.

First, I'll use the corresponding classes for constructing an online form, then I'll instruct the application to apply client-side validation on some of the form fields. Finally I'll have the application perform server-side checking on the form data, by displaying the appropriate error messages if any values entered on the form eventually fail to pass the verification process.

They step through its creation, from a bare-bones form, on to adding validation, putting those pieces together, and a look at the overall structure of the form to get a good, whole picture...

0 comments voice your opinion now!
form processor php5 form processor package using form processor php5 form processor package using


DevShed:
Building a PHP5 Form Processor - Coding the Form Validator Module
January 24, 2006 @ 06:57:09

DevShed has the second part of their "Building a PHP5 Form Processor" series posted today - Coding the Form Validator Module. It looks at how to construct a set of functions that will check the data inputted to ensure it exists and correct/valid.

In this second part of a three-part series, we take up the topic of server-side validation. By the time you finish this article, you'll have the general guidelines for how to build a form validating class. You'll use some PHP built-in introspection functions, along with regular expressions, to assist you in building this class.

They create several functions, including validateEmpty, validateInteger, validateNumber, validateRange, and validateEmail. Each one (obviously) serves their own purpose, and some are more complex that others (validating an integer versus a valid email address), but they walk you through each, showing you plenty of code and explainations along the way...

0 comments voice your opinion now!
form processor module validator integer number range email form processor module validator integer number range email


DevShed:
Building a PHP 5 Form Processor - Coding the Form Generator Module
January 17, 2006 @ 06:43:34

DevShed has a new tutorial today (the first of three in the series) that talks about the creation of a PHP 5 Form Processor.

Most developers must deal with the job of developing robust data validation for forms on a regular basis. Nobody wants to write the same code over and over, so this article (the first of three in a series) will help you develop an extensible and reusable form validation package. By the end of the article, you will have all the relevant classes that integrate the generator module of the PHP form processor.

They start off showing you how to create the forms (using reusable elements), complete with code. Moving on, they look at client-side validation with some help from a bit of Javascript. They wrap this part of the series up with a look at how to combine them to create an actual form with some validating built-in...

2 comments voice your opinion now!
php5 form generator validation javascript processor php5 form generator validation javascript processor



Community Events





Don't see your event here?
Let us know!


api configure laravel threedevsandamaybe introduction library bugfix wordpress list install application interview developer community unittest language code series release podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework