Saturday, December 09, 2006

PHP Optimization Tricks

There are a number of tricks that you can use to squeeze the last bit of performance from your scripts. These tricks won't make your applications much faster, but can give you that little edge in performance you may be looking for. More importantly it may give you insight into how PHP internals works allowing you to write code that can be executed in more optimal fashion by the Zend Engine. Please keep in mind that these are not the 1st optimization you should perform. There are some far easier and more performance advantageous tricks, however once those are exhausted and you don't feel like turning to C, these maybe tricks you would want to consider. So, without further ado...
1) When working with strings and you need to check that the string is either of a certain length you'd understandably would want to use the strlen() function. This function is pretty quick since it's operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase & hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using a isset() trick.

if (strlen($foo) < href="">PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.

3) When it comes to printing text to screen PHP has so many methodologies to do it, not many users even know all of them. This tends to result in people using output methods they are already familiar from other languages. While this is certainly an understandable approach it is often not best one as far as performance in concerned.

print vs echo

Even both of these output mechanism are language constructs, if you benchmark the two you will quickly discover that print() is slower then echo(). The reason for that is quite simple, print function will return a status indicating if it was successful or not, while echo simply print the text and nothing more. Since in most cases (haven't seen one yet) this status is not necessary and is almost never used it is pointless and simply adds unnecessary overhead.


Using printf() is slow for multitude of reasons and I would strongly discourage it's usage unless you absolutely need to use the functionality this function offers. Unlike print and echo printf() is a function with associated function execution overhead. More over printf() is designed to support various formatting schemes that for the most part are not needed in a language that is typeless and will automatically do the necessary type conversions. To handle formatting printf() needs to scan the specified string for special formatting code that are to be replaced with variables. As you can probably imagine that is quite slow and rather inefficient.


This output method comes to PHP from PERL and like most features adopted from other languages it's not very friendly as far as performance is concerned. While this method allows you to easily output large chunks of text while preserving things like newlines and even allow for variable handling inside the text block this is quite slow and there are better ways to do that. Performance wise this is just marginally faster then printf() however it does not offer nearly as much functionality.

?> <?

When you need to output a large or even a medium sized static bit of text it is faster and simpler to put it outside the of PHP. This will make the PHP's parser effectively skipover this bit of text and output it as is without any overhead. You should be careful however and not use this for many small strings in between PHP code as multiple context switches between PHP and plain text will ebb away at the performance gained by not having PHP print the text via one of it's functions or constructs.

4) Many scripts tend to reply on regular expression to validate the input specified by user. While validating input is a superb idea, doing so via regular expression can be quite slow. In many cases the process of validation merely involved checking the source string against a certain character list such as A-Z or 0-9, etc... Instead of using regex in many instances you can instead use the ctype extension (enabled by default since PHP 4.2.0) to do the same. The ctype extension offers a series of function wrappers around C's is*() function that check whether a particular character is within a certain range. Unlike the C function that can only work a character at a time, PHP function can operate on entire strings and are far faster then equivalent regular expressions.
preg_match("![0-9]+!", $foo);

5) Another common operation in PHP scripts is array searching. This process can be quite slow as regular search mechanism such as in_array() or manuall implementation work by itterating through the entire array. This can be quite a performance hit if you are searching through a large array or need to perform the searches frequently. So what can you do? Well, you can do a trick that relies upon the way that Zend Engine stores array data. Internally arrays are stored inside hash tables when they array element (key) is the key of the hashtables used to find the data and result is the value associated with that key. Since hashtable lookups are quite fast, you can simplify array searching by making the data you intend to search through the key of the array, then searching for the data is as simple as $value = isset($foo[$bar])) ? $foo[$bar] : NULL;. This searching mechanism is way faster then manual array iteration, even though having string keys maybe more memory intensive then using simple numeric keys.


$keys = array("apples", "oranges", "mangoes", "tomatoes", "pickles");
if (in_array('mangoes', $keys)) { ... }


$keys = array("apples" => 1, "oranges" => 1, "mangoes" => 1, "tomatoes" => 1, "pickles" => 1);
if (isset($keys['mangoes'])) { ... }

The bottom search mechanism is roughly 3 times faster.

Tuesday, November 07, 2006

Programming Designs Forums / 10 Old Photos of Famous Programmers and Business Men

Found some cool old photos of various people such as Linus Torvald, Larry Page, Sergey Brin, Dennis Ritchie, Steve Woznaik, Steve Jobs, and more. A blast from the past.

PHP Programming1. Tim Berners Lee. Founder of the World Wide Web.PHP Programming2. Steve Woznaik (the one sitting down) and Steve Jobs of APPLE Computers. He was three months late in filing a name for the business because he didn't get any better name for his new company. So one day he told to the staff: "If I'll not get better name by 5 o'clcok today, our company's name will be anything he likes..." so at 5 o'clcok nobody comeup with better name, and he was eating APPLE that time... so he keep the name of the company 'Apple Computers'.PHP Programming3. Bill Hewlett (left) and Dave Packard (right) of HP. Behind them in the picture is the famous HP Garage. Bill Hewlett and Dave Packard tossed a coin to decide whether the company they founded would be called Hewlett-Packard or Packard-Hewlett. And the winner was NOT Bill... the winner was Dave.PHP Programming4. Picture taken when Microsoft was started. What a group of nerds xDPHP Programming5. Ken Thompson (left) and Dennis Ritchie (right) , creators of UNIX. Dennis Ritchie improved on the B programming language and called it 'New B'. B was created by Ken Thompson as a revision of the Bon programming language (named after his wife Bonnie). He later called it C.PHP Programming6. Larry Page (left) and Sergey Brin (right), founders of Google. Google was originally named 'Googol'. After founders (Stanford graduates) Sergey Brin and Larry Page presented their project to an angel investor... they received a cheque made out to 'Google' !... So they kept name as GOOGLE.PHP Programming7. Gordon Moore (left) and Bob Noyce (right) ,founders of Intel. Bob Noyce and Gordon Moore wanted to name their new company 'Moore Noyce'. But that was already trademarked by a hotel chain... So they had to settle for an acronym of INTegrated ELectronics... INTELPHP Programming8. Scott Mc Nealy, Andreas Bechtolsheim , Bill Joy and Vinod Khosla of SUN(StanfordUniversity Network) MicroSystems. Founded by four StanfordUniversity buddies. Andreas Bechtolsheim built a microcomputer; Vinod Khosla recruited him; Scott McNealy to manufacture computers based on it; and Bill Joy to develop a UNIX-based OS for the computer... SUN is the acronym for Stanford University Network.PHP Programming9. Linus Torvalds of Linux Operating System Linus Torvalds originally used the Minix OS on his system which he replaced by his OS. Hence the working name was Linux (Linus' Minix). He thought the name to be too egotistical and planned to name it Freax (free + freak + x). His friend Ari Lemmk encouraged Linus to upload it to a network so it could be easily downloaded. Ari gave Linus a directory called linux on his FTP server, as he did not like the name Freax. Linus like that directory name and he kept the name of his new OS to LINUX...PHP Programming10. Picture taken when INFOSYS was started. This picture was found in the album of the clerk who took this picture on his birthday...

Thursday, September 07, 2006

PHP statistics for August 2006

Here are the PHP stats for August 2006. To learn about methodology, read la section phpversion. 15 millions servers were surveyed during May, and 8,2 were used for stats : domaines without web sites, those unreachable, ISP or domain parkings were not considered.


Thursday, August 10, 2006

Jani Taskinen, Lead PHP Developer, Quits

Jani Taskinen, one of the lead developers of the Zend Engine (the engine that powers PHP), as well as a lead developer for the thread safety system and other core components of the PHP project, has quit in a relatively cryptic message to the php-internals mailing list. Jani has been involved with PHP for about 6 years and his loss will undoubtedly be a big blow for the PHP project.

From: Jani Taskinen

Thank you all for the last 6 years or so.
It has been fun (sometimes) and many times not so much fun.
Unfortunately I have had enough and I don't want to be associated with this project anymore. I'm sure most people (the ones who matter) can understand why. If someone doesn't, I could not care less. Take care.

Please do not reply to this email.


p.s. Delete my CVS account. I have no use for it anymore

From IRC conversation:

"_sniper_" is Jani Taskinen.

<_sniper_> hehehehe..
<_sniper_> all other members of the UN security council wanted to condemn Israel for attacking the UN post but USA (freedom and democracy) vetoed it....Israel says the resolution was fair.
<_sniper_> hell yeah..
<_sniper_> NUKE ISRAEL!
<_sniper_> I'm so full of that fucking country..
<_sniper_> Eye for an eye..I'll kill one Israel officer for one of ours, is that fair?
<_sniper_> I bet I'll be hanged for that.
<_sniper_> They kill one of my brother-in-arms-for-peace..I think I'm entitled to kill one of their nazis.
<_sniper_> Hezbollah, where can I enlist?
<_sniper_> FYI: I don't care at all what anybody thinks about me. I'm going to be openly anti-Israel from now on. This was the last straw for me. Fuck you jews.
<_sniper_> I will also quit this project. As long as it's backed by some Israel company, I don't want to have anything to do with it.
<_sniper_> Good bye.
<-- _sniper_ ( has left #php.pecl

Saturday, July 15, 2006

Implementing Additional Methods with mysqli and PHP 5

Welcome to the third installment of the series "Using mysqli in PHP5." Comprised of three articles, this series teaches you how to use the most important methods and properties included in the "mysqli" extension, which is bundled with PHP 5, in order to get the most out of the MySQL 4.1 database server and above.


If you've been reading up my two previous articles, then quite probably you'll know how to utilize the mysqli's core methods for connecting to MySQL, as well as performing many other useful tasks, such as running single and multiple queries, preparing SQL statements, and using the COMMIT and ROLLBACK features found in MySQL 4.1 and up. What's more, you'll surely recall that this extension allows you to handle one or more result sets via an object-oriented approach, which is very convenient if you're particularly inclined to work with object-based applications.Additionally, I covered, with numerous hands-on examples, other combinations of handy methods and properties, in order to show you how to perform some common MySQL-related operations. In this case obviously I'm talking about counting the number of rows affected after running a specific query, or determining the number of rows returned by a result set, among others. Of course, one of the best points regarding the use of the "mysql" library rests on how easily it allows you to accomplish all the things (and more) that I mentioned before by using an object-oriented approach, without the need to define custom classes. Once the library is available to your system, you can go ahead and start writing down object-based code.Well, if I stand behind the previous paragraphs, I must say that the "mysqli" extension offers an impressive set of features, which can be implemented right from the very beginning. However, and speaking of its cool features, in the next few lines, I'm going to show you a few more. Over the course of this last tutorial, I'll be covering some other methods and properties, mainly aimed at finding the IDs after inserting new rows, and obtaining information about specific table fields.Now, be patient and start reading the last chapter of this story. Let's do it together!

Next: Fetching rows, finding IDs and moving result set pointers: implementing the “fetch_array()” and “data_seek()” methods >>

Tuesday, June 20, 2006


Now you can get the word out to anyone, because we just added a new publishing feature that lets you show an interactive calendar to others -- even if they don't use Google Calendar.


Saturday, June 10, 2006

Developing PHP the Ajax way

Asynchronous JavaScript and XML ( Ajax ), is arguably the most popular new Web technology. In this two-part "Developing PHP the Ajax way" series, you will create a simple photo album as an online Web application, entirely in PHP and the Simple Ajax Toolkit (Sajax). You'll begin by writing a simple photo album using the standard method of PHP development and later apply Sajax to make it an active Web application.


The Basics of Serializing Objects in PHP

Object serialization in PHP is very easy, and can be used for a variety of different purposes. It can be used to perform some fairly complex operations, in fact. This article, the first of a three-part series, introduces you to object serialization and a number of the tasks for which you can put this approach to use.

Read more at PHP ...

Saturday, May 27, 2006

PHP DEVELOPMENT: Picasa for Linux

Let's say you happily use Linux, but you sometimes find yourself wishing you had access to interesting new apps that launch for Windows but not Linux. And maybe, like a lot of us, you have a lot of photos stored on your personal machine, and you've read about or even tried Google's photo organizer, Picasa. But using it means switching to Windows, even temporarily. (We know--thanks but no thanks.)


Tuesday, May 23, 2006

An Introduction to Sockets in PHP

Working with low-level sockets can be a painful task in PHP. Fortunately, PHP offers a nice library of socket handling functions to make your life easier. If you do a lot of network programming in PHP, you will want to check out this three-part series, which starts with the basics and takes you through more advanced approaches. This article is the first one in the series.


Thursday, May 18, 2006

PHP IDE Debug Protocol

Lately there were many questions and comments on blogs and in PHP related forums regarding the debugger protocol, which will be used in the PHP IDE project at For those of you who are not familiar with the ' debug protocol ' term or do not know what I am talking about here is a short explanation. PHP IDE Debug Protocol

Wednesday, May 17, 2006

Making AJAX development easier

AJAX has the power to make your site more compelling and more dynamic, but AJAX development is often complicated, with much of the development time spent working around browser quirks and the fragility of AJAX components. Trust us, we know--the development of our own AJAX apps, like Google Maps and Google Calendar, caused us no small amount of AJAX-induced frustration.

Making AJAX development easier

Monday, May 15, 2006

Creating ZIP and TAR archives on the fly with PHP

In this tutorial you will learn how to create ZIP and TAR archives dynamically using PHP and the PEAR::Archive_Zip and PEAR::Archive_Tar packages.

Creating ZIP and TAR archives on the fly with PHP

Thursday, May 11, 2006

PHP Optimization

Php optimization is the skill of fine tuning an application to extract maximum performance with minimum server load. Many of my clients in the past have wondered why I spend extra hours just to get the script execution time to be cut down by 1 second.

PHP Optimization


The TIOBE Programming Community Index has been updated for April 2006 showing their view on the status of programming languages in the development community. PHP moves up a spot from 5th to 4th. The long-in-the-tooth C fades back a bit relinquishing 1st place to Java, while C++ gains on its brethren with PHP biting on its heels (a margin of 0.02 between their percentages). PHP has a higher climb rate so expect another big move in the coming year.

Monday, May 08, 2006

PHP : Zend Framework

PHP Powers the WebNow, the world's most popular web programming language gets even better with an easy to use framework for developing the next generation of web applications.


PHP Documentation

PHP Documentation - little collection of the docs,tutorials and howtos related to Linux/Unix programming, system administration and web development. PHP Documentation


Friday, May 05, 2006

PHP 5.1.4

PHP 5.1.4 fixes critical error in PHP 5.1.3 with the $_POST array.
All people that has upgraded to PHP 5.1.3 are recommended to download upgrade to PHP 5.1.4 from official site:

Download PHP 5.1.4

Completely free web design contract - checked in 2006 by qualified lawyers

Although not directly PHP-related, I'm aware that a lot of people who look over this blog are freelance or part time coders. It's always important to make sure that both you and your client stand on the same level, and as such, MediaSurgery have been kind enough to release their web design contract (checked by a lawyer) for free. The contract is available in both Open Office and Microsoft Word formats. Go get it!

Completely free web design contract - checked in 2006 by qualified lawyers

Wednesday, May 03, 2006

PHP 5.1.3. Release Announcement

The PHP development team is proud to announce the release of PHP 5.1.3. This release combines small number of feature enhancements with a significant amount of bug fixes and resolves a number of security issues. All PHP users are encouraged to upgrade to this release as soon as possible.

The security issues resolved include the following:

  • Disallow certain characters in session names.
  • Fixed a buffer overflow inside the wordwrap() function.
  • Prevent jumps to parent directory via the 2nd parameter of the tempnam() function.
  • Enforce safe_mode for the source parameter of the copy() function.
  • Fixed cross-site scripting inside the phpinfo() function.
  • Fixed offset/length parameter validation inside the substr_compare() function.
  • Fixed a heap corruption inside the session extension.
  • Fixed a bug that would allow variable to survive unset().

The feature enhancements include the following notables:

  • The use of the var keyword to declare properties no longer raises a deprecation E_STRICT.
  • FastCGI interface was completely reimplemented.
  • Multitude of improvements to the SPL, SimpleXML, GD, CURL and Reflection extensions.
  • Support for many additional date formats added to the strtotime() function.
  • A number of performance improvements added to the engine and the core extensions.
  • Added imap_savebody() that allows message body to be written to a file.
  • Added lchown() and lchgrp() to change user/group ownership of symlinks.
  • Upgraded bundled PCRE library to version 6.6

The release also includes over 120 bug fixes with a focus on:

  • Make auto_globals_jit work without too many INI changes.
  • Fixed tiger hash algorithm generating wrong results on big endian platforms.
  • Fixed a number of errors in the SOAP extension.
  • Fixed recursion handling in the serialize() functionality.
  • Make is_*() function account of open_basedir restrictions.
  • Fixed a number of crashes in the DOM and PDO extensions.
  • Addressed a number of regressions in the strtotime() function.
  • Make memory_limit work in Win32 systems.
  • Fixed a deadlock in the sqlite extension caused by the sqlite_fetch_column_types() function.
  • Fixed memory leaks in the realpath() cache.
For a full list of changes in PHP 5.1.3, see the ChangeLog

Dipping a Toe into Rapid Application Development for PHP

Dipping a Toe into Rapid Application Development for PHP: "[Summary]

As Andi Gutmans presented at his php|tek keynote, and reinforced by IBM in their showing of QEDWiki, there is indeed a place in PHP for the Rapid Application Development. As part of Andi’s keynote, he spoke about component architectures and showed a quick demo of what that might look like in the future. He did so with a proof of concept called phpBlox. Now, don’t get too excited, it looks nice and worked for the demo, but we are still only at the beginning of the Road to RAD."

Sunday, April 30, 2006

Google Maps

The Google Maps API supports the same browsers as the Google Local site. Since different applications require different behaviors for users with incompatible browsers, the Maps API provides a global method (GBrowserIsCompatible()) to check compatibility, but it does not have any automatic behavior when it detects an incompatible browser. The script can be parsed in almost every browser without errors, so you can safely include that script before checking for compatibility.


Openomy PHP API

Openomy is an online file system. You can store files on Openomy and access them from any computer. Openomy organizes files and users via tags (as opposed to folders). You can choose to keep your files guarded by Openomy, or allow certain outside applications (of your choice) to do new and interesting things with your data.

Openomy PHP API

Friday, April 28, 2006


Welcome back to the third edition of "a week in phpworld" - my subjective view at the highlights that happened last week in the phpworld.

PHP's World

Ilia Alshanetsky finally released the third Release Candidate for PHP 5.1.3 on friday. Somehow confusing to me, that one can't find the fix of the security-holes that lead to the "unofficial" RC3 i reported about last week in the ChangeLog of RC3. Instead you find them in the ChangeLog of RC2 - a RC that was actually released at end of march but now is timed to 6th of april. Confused now, too? However, Ilia asked the community once more to test the RC3 as much as possible - looking to release a final version of PHP 5.1.3 this week thursday. You can find the source download as usual at Ilias and the binaries for windows at Edin's
Some other good news come from : Scott Mattocks announced a Release plan for PHP-GTK 2-alpha1 in the weekly PHP-GTK News. According to this plan, there are only three main-issues left preventing an immediately release. First there is a review for some patches needed , next some windows-bugs has to be fixed and last there is a need for update of the packaging script.


Wednesday, April 26, 2006

Flash Lite 2

Flash Lite 2 Performance is important to consider application performance and optimization from the beginning of each project for creating Flash Lite content for mobile phones.


PHP Hosting

Free PHP Hosting

Tuesday, April 25, 2006

Introduction to PHP Objects, Part 1

I'll be introducing one of the more interesting and useful methods of writing PHP scripts -- the object-oriented method. Those of you who might have experience with an object-oriented programming language such as Java or even C++ will find themselves right at home with most of the concepts I'll begin outlining here. However, be warned -- PHP objects have a mixture of C++ and Java, making them a little different than what you might be used to. In any case, let's get started with the basics.

Introduction to PHP Objects, Part 1

Object Oriented PHP: Paging Result Sets

If as a PHP developer you find yourself writing the same code again and again, or dealing with an increasingly stifling array of custom functions and include files in your script, it's probably time you looked into Object Oriented Programming (OOP). OOP has truly come into its own over the past 5 years or so. The world over, application and Web developers alike have discovered the merits of this type of software design, and now it's your turn!

In this article, I'll teach you the basic principles and features of Object Oriented Programming that exist in the PHP language, and take you through a few simple examples so you can see how it all works. We'll then take this newfound knowledge and apply it to a practical problem. Together, we'll create a reusable component that will handle the splitting of MySQL result sets into pages.

Object Oriented PHP

Thursday, April 20, 2006

PHP Performance: lighttpd vs apache

PHP Performance

lighttpd + fastcgi is more than 25% faster than apache + mod_php4.
For static files we already know that lighttpd is 4-6 times faster.

whenpenguinsattack: lighttpd vs apache

Sunday, April 16, 2006

A Quickstart to using PEAR with PHP for database driven web applications - Codepoets - David and Katherine Goodwin

intro:This article shows how to use the PEAR DB package for database abstraction and querying.subject:pear, php, database, mysql, postgresqlcontent:What is PEAR::DB?PEAR::DB, provides a uniform, cross platform, cross database method for connecting to databases, when writing PHP applications/scripts.Extensive documentation can be found online hereThis article aims to show briefly, how queries and updates can be performed when using PEAR DB.What's wrong with the traditional PHP method(s)? * Inconsistent API - mysql_connect, pg_connect etc * Different APIs have different methods of connecting to a database * Inconsistent methods for retrieving data and/or performing updates (pg_exec, pg_query, mysql_query etc) * Difficult to port code between databases * Not all APIs support all features (E.g. prepared statements) * Inconsistent error handling (mysql_error(), pg_last_error()) * Secure/safe queries require effort (pg_escape_string(), mysql_real_escape_string(), addslashes(), magic_quotes_gpc())


Wednesday, April 12, 2006

Ajax Frameworks, Tools and Libraries with PHP

Xajax - PHP Class Library

What Xajax is:

‘xajax is an open source PHP class library that allows you to easily create powerful, web-based, Ajax applications using HTML, CSS, JavaScript, and PHP. Applications developed with xajax can asynchronously call server-side PHP functions and update content without reloading the page.’

How it works:

‘The xajax PHP object generates JavaScript wrapper functions for the PHP functions you want to be able to call asynchronously from your application. When called, these wrapper functions use JavaScript’s XMLHttpRequest object to asynchronously communicate with the xajax object on the server which calls the corresponding PHP functions. Upon completion, an xajax XML response is returned from the PHP functions, which xajax passes back to the application. The XML response contains instructions and data that are parsed by xajax’s JavaScript message pump and used to update the content of your application.’

Find out more about Xajax at the XajaxProject website - or visit their sourceforce project page

Sajax - Tool

What Sajax is:

‘Sajax is a tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call ASP, Cold Fusion, Io, Lua, Perl, PHP, Python or Ruby functions from your webpages via JavaScript without performing a browser refresh. The toolkit does 99% of the work for you so you have no excuse to not use it.’

How it works:

‘Our toolkit creates a JavaScript stub function that calls functions you export from your script. It handles all the connection details and calls a callback function of your design when the data is available.’

Find out more about Sajax at the ModernMethods

Ajax HTML from PEAR - Libraries

This is a PHP and JavaScript package available through the official PEAR website. For simple examples tutorials, visit the package authors website. To download this package, visit the HTML_AJAX Package page on PEAR.

XOAD - PHP Based Ajax Framework (formerly known as NAJAX)

‘XOAD is a PHP based AJAX/XAP object oriented framework that allows you to create richer web applications.

XOAD has many benefits:

it uses JSON and native PHP serialized objects to communicate,
special attention has been paid to security,
supports server side events (observation),
client side events (XOAD Events),
server and client extensions,
HTML manipulation (extension),
Caching (extension).’

Find out more about XOAD at the XOAD
Wiki website.

AjaxAC - PHP Based Ajax Framework

‘AjaxAC is an open-source framework written in PHP, used to develop/create/generate AJAX applications. The fundamental idea behind AJAX (Asynchronous JavaScript And XML) is to use the XMLHttpRequest object to change a web page state using background HTTP sub-requests without reloading the entire page. It is released under the terms of the Apache License v2.0.’

‘The basic idea behind AjaxAC is that you create an AjaxAC application, which in itself contains a number of action handlers and event handlers. An application in this context might mean an entire web site powered by AJAX, or it could mean a subset of a form (such as the CountryRegionCityJax example, which could be a small part of a signup form, for example).’

Find out more about the AjaxAC Framework

CPAINT - Ajax Toolkit (Cross-Platform Asynchronous INterface Toolkit)

What CPAINT is?

‘CPAINT (Cross-Platform Asynchronous INterface Toolkit) is a multi-language toolkit that helps web developers design and implement AJAX web applications with ease and flexibility. It was originally born out of the author’s frustration and disappointment with other open-source AJAX toolkits. It is built on the same principles of AJAX, utilizing JavaScript and the XMLHTTP object on the client-side and the appropriate scripting language on the server-side to complete the full circle of data passing from client to server and back.’

Some Features:

‘Flexibility - built for small and enterprise applications
100% OOP approach
Supports multiple scripting languages (ASP & PHP)
Unified JavaScript file for all functions
Supports both Remote Scripting and XML
Supports both local & remote functions
Single or multiple XMLHTTP objects
Returns backend data as text or as a JavaScript XML/DOM document object
Can support both POST & GET requests
Backend proxy functions for accessing remote functions and data
Tested with all major browsers
Distributed under the GNU GPL & LGPL ‘

Find out more at the CPAINT website or visit their SourceForge Project page.

Sunday, April 09, 2006

Google Adsense

Google Adsense

Linux Documentation Bookmarks

Linux Documentation - little collection of the docs,tutorials and howtos related to Linux/Unix programming, system administration and web development.


PHP: Installation on Unix systems - Manual

PHP test installation


Creating sortable lists with PHP and AJAX

You might have been in a situation before where you had a list of items in your database that needed to be output in a specific order. These items could be anything: perhaps a listing of your favourite movies or your favourite books. For whatever reason, you want them ordered in a custom way that can’t be determined automatically (such as alphabetical).

This article covers the implementation of a system that lets you easily define the order of such a list.