PHP Code, Setup and Demo of Jaxl boshchat application

August 17, 2010   -   PHP, XMPP   -   80 comments

Jaxl 2.0 bosh support allow web developers to write real time web applications within minutes, without having any pre-requisite knowledge about the XMPP protocol itself. In this blog post, I will walk you through setup and demo of an XMPP based web chat application using Jaxl library. Get the code Follow the following steps to [...]

Releasing Jaxl 2.0 – Object oriented XMPP framework in PHP

August 2, 2010   -   Open Source Projects, PHP, XMPP   -   6 comments

After months of restructuring the Jaxl library, I am pleased to announce Jaxl 2.0, an object oriented XMPP framework in PHP for developing real time applications for browsers, desktops and hand held devices. What’s new in Jaxl 2.0? A lot of structural changes has been done from the previous version to make it more scalable, [...]

MEMQ : Fast queue implementation using Memcached and PHP only

February 7, 2010   -   PHP, Scalability   -   17 comments

Memcached is a scalable caching solution developed by Danga interactive. One can do a lot of cool things using memcached including spam control, online-offline detection of users, building scalable web services. In this post, I will demonstrate and explain how to implement fast scalable queues in PHP. MEMQ: Overview Every queue is uniquely identified by [...]

How to use locks in PHP cron jobs to avoid cron overlaps

December 28, 2009   -   PHP   -   39 comments

Cron jobs are hidden building blocks for most of the websites. They are generally used to process/aggregate data in the background. However as a website starts to grow and there is gigabytes of data to be processed by every cron job, chances are that our cron jobs might overlap and possibly corrupt our data. In [...]

How to add content verification using hmac in PHP

December 7, 2009   -   PHP   -   20 comments

Many times a requirement arises where we are supposed to expose an API for intended users, who can use these API endpoints to GET/POST data on our servers. But how do we verify that only the intended users are using these API’s and not any hacker or attacker. In this blog post, I will show [...]

PHP tokens and opcodes : 3 useful extensions for understanding the working of Zend Engine

November 15, 2009   -   PHP   -   10 comments

“PHP tokens and opcodes” – When a PHP script is executed it goes through a number of processes, before the final result is displayed. These processes are namely: Lexing, Parsing, Compiling and Executing. In this blog post, I will walk you through all these processes with a sample example. In the end I will list [...]

Writing a custom unix style tail in PHP using Libevent API on Mac OS X 10.5.x and other platforms

November 2, 2009   -   PHP   -   16 comments

Libevent is a library which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Many famous applications/frameworks/libraries like memcached are using libevent. In this blog post, I will demonstrate how to write a custom unix style tail script using Libevent [...]

Web Security : Using crumbs to protect your PHP API (Ajax) call from Cross-site request forgery (CSRF/XSRF) and other vulnerabilities

October 5, 2009   -   PHP   -   13 comments

Have your API calls ever being used directly by someone without your permission? If yes, read on to find out how can we protect our API’s from such spammers and hackers. Before we go ahead and see a possible solution for this, lets try to list out a few cases, when our API’s can be [...]

Building a Custom PHP Framework with a custom template caching engine using Output Control functions

August 17, 2009   -   PHP   -   10 comments

In past 1 year or so, I had opportunities of using a lot of php frameworks including zend, symfony, cakephp, codeigniter. All frameworks have their pros and cons, however that is out of scope of this blog post. You may want to checkout this comparison list of php frameworks here. In this blog post I [...]

XML Parsing in PHP, XPATH way – The best I know so far

July 7, 2009   -   PHP   -   32 comments

If you are a PHP developer, you surely must have done XML parsing at some stage or the other. Over the years I myself have implemented XML Parsing in atleast 3-4 different ways. Finally I have stuck to this approach which I personally find far more better than the rest, Not only because it’s quite [...]

Powered by Wordpress. © 2008-2010 All Rights Reserved.