Home arrow PHP arrow Completing a Query Processor in PHP

Completing a Query Processor in PHP

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.

TABLE OF CONTENTS:
  1. Completing a Query Processor in PHP
  2. A brief look at the QueryProcessor class
  3. Expanding the functionality of the QueryProcessor class: defining the getMXRecords() and checkDNSRecords() methods
  4. Scanning TCP ports, running a WHOIS service and more: defining the scanPort() and getWhois() methods
  5. Getting the class completed: listing the full source code of the QueryProcessor class
By: Alejandro Gervasio
Rating: starstarstarstarstar / 11
May 31, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

If you've been reading the previous articles of the series, then you'll probably know that using some networking PHP built-in functions is really an easy process, and admittedly presents some interesting points, particularly if you're interested in swimming deeply in the waters of PHP networking programming.

With reference to exploring the numerous PHP functions included in its network library, in the second article I aggregated a few handy methods to the "QueryProcessor" class, in order to demonstrate how to use the "exec()" native PHP function for running some popular Windows network monitoring utilities. These include "ipconfig," "netstat" and "ping" programs, as well as the "lookup" command, which can be quite useful for (among other things) retrieving the list of MX records that correspond to a specific Internet host.

However, as I said right at the end of the previous article, the "QueryProcessor" class isn't complete yet, since I'd like to add to it even more methods, aimed at performing some handy tasks. These include scanning of specific TCP ports, searching and checking for different types of DNS records, and so forth.

Therefore, 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.

Ready to start learning how to code the remaining methods of the query processor class? Let's do it together!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap

Dev Shed Tutorial Topics: