Category Archives: Tutorial

Php web development tutorials

How to Check System Load in Php on Linux

By | August 8, 2020

System load System load is a measure of how busy the system is running the processes. Higher system load simply means more processes are running and more are waiting to be run. When coding php applications, it sometimes is useful or necessary to find the current load on the server/system. For example if you want… Read More »

How to enable encoded forward slash in path-info in mvc or CodeIgniter app urls

By | May 16, 2023

Path Info Urls When using path info data , the urls of codeignitor apps or your custom mvc frameworks looks something like this example.com/index.php/controller/method/param1/param2 or example.com/controller/method/param1/param2 The path info data can be used to specify which class and method should be invoked on server application. Forward slash in parameter Sometimes it might so happen that… Read More »

How to use “path info” with PATH_INFO / ORIG_PATH_INFO in Apache Php Setup

By | May 15, 2023

The PATH-INFO is the extra path data that follows the name of a script (or servlet) in the URL. Its different from query string. Here is a classic example: https://www.examples.com/index.php/some/path?a=b Now, over here we are actually invoking the script index.php only. However also providing some path-info data “/some/path”, which is then followed by the query… Read More »

Backup mysql database with php and zip it

By | May 1, 2009

Many php applications prefer to backup the mysql database from within the application and save it as an archive. The mysqldump commandline utility can be used to perform this function of backing up a mysql database as sql file. The command would be like this : mysqldump –user=$username –password=$password –opt $db_name > $dir/backup.sql The above… Read More »

Run php scripts from cron

By | March 22, 2009

Automatic Running In a web application there are many cases, when a certain piece of code or script needs to run automatically in the background to perform certain tasks, without the need of any user to start it. Like scraping, extracting or crawling data from web or perform some regular tasks like sending emails, system… Read More »

Get real IP address of user in php

By | December 4, 2008

Client IP address Php applications are mostly web based and often need to get the ip address of the user who is connecting to the application. Ip address is required for various logging purpose, geolocation service etc. The most common way to get the ip address of a remote user is by using the superglobal… Read More »