Articles filed under PHP


How to handle long-polling of XHR requests in PHP

A common need you often face in PHP scripting these days is writing a long-polling endpoint for things like sending notifications or other kinds of responses back to the client. While using something dedicated like node, cometd or websocket makes ideal sense for such things, there are use-cases when you … Read More

[PHP/Codeigniter] Getting multi-queries right with SQLITE

My earlier article dealt with multi-query issues of MySQL, this one is dedicated to SQLITE. Multi-queries are often discouraged to begin with but there are times when you find yourself using them. One typical use case is populating the database initially when it's empty. You do this by running an … Read More

[PHP/Codeigniter] Playing with multi-queries in MySQL

Multi-queries are often discouraged with mysqli functions but there are times when you must use them. One obvious use case is initializing the database. One of the first things your app must do is determine if the database tables exist or not, and then run an initializing SQL script if … Read More

Wordpress to Pelican in 24 hours

Today, I finished migration of my blog from a self-hosted Wordpress site to a statically hosted Github Pages site. For the static site generator, instead of choosing Jekyll which is a hot favorite of rubyists, I went for Pelican instead as I figured my Python skills might be somewhat useful … Read More




How to create a Google Drive App in PHP

This is the second article in the drive series for web programmers that aims to explain how to use the Google Drive API in your web applications to access files/folders on behalf of your logged-in users. One of the basic tasks here is to authenticate to google and access … Read More

Farewell Wordpress, Hello Jekyll!

Here I am, signing off from a self-hosted, over-bloated Wordpress site and finding a welcome change in Jekyll, a blog-aware static site generator. There is nothing new about this, several well-known bloggers have already migrated to Jekyll in the last few years including Rasmus Andersson, Nick Quaranto and Roger Chapman … Read More

PHP-FPM vs node.js - The REAL Performance Battle

Even after my last article about PHP and node.js benchmarking, my search for the holy grail of performance truth still continues. However, I do understand now that pitting PHP running on apache against a stand-alone node was a bit unfair with PHP for it was limited by what the … Read More

Page 1 / 2 »