Life SlashBoot The Internet Unices Web Development
This article last updated: Sunday, 3 September 2006

PHP can do more than just web pages

PHP is possibly the most common scripting language in use on the web, thanks to its rapid development nature and great support for common peripheral technologies, such as database access, image manipulation and much more. I've been a keen PHP developer for several years now and as I keep on top of any security issues, I don't have any problem or worries with the language. Although I am something of an old school procedural style programmer, I am impressed by the OOP functionality of PHP5 and am beginning to see real benefits in expanding my style to cover object oriented classes and the like and have no doubts that my projects stand to benefit as a result.

Using PHP as a shell scripting language

Although I like using the shell for various script tasks, including log analysis and rotation, making large amounts of changes to documents based on fixed strings or regular expressions and a plethora of other tasks. At other times I've wanted to test real performance of web services that I don't feel ab, the apache benchmark utility, was able to do accurately. Being able to send Firefox blasting through all the pages on SlashBoot dot org, directly and through anonymous proxies, in quick succession, getting its to do list from my existing sitemap html and xml files, was all achievable using the shell and proved more than useful. Other tasks have involved constructing and firing off requests using the nc tool, to test performances under load and mimicing bandwidth and DoS attacks.

Now, all of this is still achievable using PHP and with PHP5's added versatility, I'm seriously considering porting some of my oft-used shell scripts to PHP and seeing how it performs in the same tasks. The functionality in PHP and the uniformity of the language syntax make ir a viable language to use. The ability to tie it into existing systems and resources also has obvious benefits. I've had a few basic PHP scripts that are run from cron to perform regular database maintenance tasks, akin to garbage collection, in place on the server for some time now. It has got me moving slowly towards using PHP for more and more tasks away from the web. So far I have only written a few short scripts to give me some PHP specific functions at the shell prompt. As time goes by, I dare say I will be creating more PHP scripts to sit in my personal bin folder and I can also see me using a local database and building local applications to do so much of the daily grind that I demand of my development machine.

Post a comment:




No HTML allowed except for plain <b>, <i>, <s>, <u> & <p> tags. NO uBB code ([b] ... [/b] style tags) are allowed and comments containing [URL] ... [/URL] tags are automatically rejected as spam.
|
URL and email address are optional, email address is never displayed.
Like this page? Furl it | del.icio.us | Spurl it
GeoLocator Contact Sitemap
Standards for a better web Valid XHTML Strict CSS inside Valid RSS2.0 feeds used on this site
Hosted by BristolGeek