Thursday, June 19, 2014

How to execute part of PHP code Asynchronously

execute php code asynchronously

Suppose you have written some PHP code which performs series of tasks when a story is submitted, this will affect the usability of the system as user have to wait long times before their post can be submitted. The solution to this problem is to move time consuming PHP code into a separate file and call that file asynchronously through socket connection in PHP.

Tuesday, June 17, 2014

Use PHP CURL with connection timeout instead of file_get_contents

Most of us uses file_get_contents in PHP for fetching contents from remote locations, but if remote location is down or not reachable the script will continue executing until maximum execution time as defined in php.ini settings.

How to Load Test your Web Applications

web applications load testing

Your perfect web app is ready for the public launch and sooner or later your realize it cannot handle heavy traffic spikes. To prevent these kinds of embarrassing situations, it always advisable to load test your web apps before launch.

Wednesday, November 16, 2011

How to Create Arrays in PHP

arrays in php

Summary: In this tutorial I will explain you what is array, where they are used, how to create arrays in php, difference between indexed arrays and associative arrays, how to access values from arrays, how to create multi dimensional arrays and lastly there is a video tutorial on Arrays in PHP in both English and Hindi.

How to Create Booleans in PHP

booleans in php

Summary: In this tutorial I will explain you how to create Boolean variables in PHP, where they are used, how to use true, false and null and lastly there is a video tutorial on How to Create Booleans in PHP in both English and Hindi.