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.

  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




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
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates


Dev Shed Tutorial Topics: