logo logo
How to Send Message to Google Cloud Messaging (GCM) Server Using JSON and PHP

How to Send Message to Google Cloud Messaging (GCM) Server Using JSON and PHP

Google Cloud Messaging (GCM) is a free service from Google that helps Android developers to send data from their servers to Android applications on Android devices. GCM is the next generation of Android Cloud...
How to Set Time Zone in PHP and MySQL

How to Set Time Zone in PHP and MySQL

Sometimes when working with PHP-MySQL application, we have to explicitly set the time zone in our application in order to match the client’s time zone. Since PHP 5.3, time zone setting is mandatory and...
How to Add Wordpress Pages Without Adding Them to Navigation Menu

How to Add Wordpress Pages Without Adding Them to Navigation Menu

Sometimes when creating a new page, we do not want the page appears on the page navigaton menu. WordPress itself does not provide that option when creating a new page. To apply it, we must change it manually...
How to Empty All Tables in a MySQL Database with PHP

How to Empty All Tables in a MySQL Database with PHP

This is a simple PHP script to empty all tables in a MySQL database. This script first will list all tables in a database using ‘SHOW TABLES‘ statement then it will empty  each table using...
How to Crop Image Using JavaScript and PHP

How to Crop Image Using JavaScript and PHP

Image cropping is a usefull feature in web application that allows user to crop an image on a web page and save it for later use. This feature is commonly used in user’s preferences tool for creating a...
How to Create Facebook Application with PHP for Beginner

How to Create Facebook Application with PHP for Beginner

Facebook is the fastest growing social networking application that currently has more than 350 million active users. One of it’s key features is Facebook Platform, that enable us to build  applications...
How to Zip Files or Folder On The Fly Using PHP

How to Zip Files or Folder On The Fly Using PHP

Sometimes in web programming when dealing with multiple files or directory download operations, it is better to serve the user with a single zip file rather than let the user manually download the file one by...
How to List A Directory Contents Using PHP (Recursive)

How to List A Directory Contents Using PHP (Recursive)

To list contents of a directory is simple in PHP, just use three PHP directory functions, opendir,  readdir and is_dir. The code: <?php function listDirectory($path) { $handle = @opendir($path); ...
How To Define Global Absolute Path in PHP

How To Define Global Absolute Path in PHP

A path is general form of a filename or directory that specified a unique location in a file system. In web programming, a path  is used to define links (url) to documents and images or to include a specified...
bottom