PHP: Google Spreadsheet with OAuth (Add, Edit, Delete, View data)

I was using ClientLogin method to access and update Google Spreadsheet. The ClientLogin method was in a deprecated state and now it has been turned off. We now need to use OAuth for authentication. Google APIs Client Library for PHP enables you to work with Google APIs such as Google+, Drive, or YouTube on your … Read more

PHP: Read Write JSON

JSON stands for JavaScript Object Notation. It is a light-weight text-based open standard designed for human-readable data. It is language-independent, with parsers available for many languages. The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, … Read more

Ubuntu: Installing Apache, PHP, MySQL & phpMyAdmin

Here are step-by-step commands about installing apache, php, mysql, and phpmyadmin on ubuntu. 1) Open Terminal – Press: CTRL + ALT + T 2) Install Apache – In terminal, type: sudo apt-get install apache2 – To test if Apache installation, Open browser and type: http://localhost – It should show text: It Works! 3) Install PHP … Read more

PHP: Read Write File, Read Scan Directory

Here is PHP code to: 1) Read / Scan any directory 2) Read any file 3) Write to any file 1) Read or Scan directory Get all files and folders inside the directory. Three ways are shown below. a) Read/Scan directory using opendir() and readdir() function $dir = "/var/www/test"; $dh = opendir($dir); while (false !== … Read more

Windows: How to install and setup XDebug in PHP Eclipse?

PHPEclipse is a PHP development plugin for the Eclipse IDE Framework. And, XDebug is a PHP extension which provides debugging and profiling capabilities. I am using Windows 7 Operating System and WAMP Server. Install XDebug in Windows – Create a php file with the code phpinfo(). – Open the newly created file in a browser. … Read more

Ubuntu Linux: How to install and setup XDebug in PHP Eclipse? [IMAGES]

PHPEclipse is a PHP development plugin for the Eclipse IDE Framework. And, XDebug is a PHP extension which provides debugging and profiling capabilities. I am using Ubuntu Operating System. This article provides a step-by-step guide on installing and setting up XDebug in PHP Eclipse in Ubuntu. Install XDebug in Ubuntu Open terminal and type the … Read more

PHP: Easily send email with PHPMailer

PHPMailer is a PHP class for PHP that provides a package of functions to send email. It is an efficient way to send e-mail within PHP. The following are some features of PHPMailer:- – Sending HTML email – Sending email with attachments – Sending email to multiple recepients via to, CC, BCC, etc – Supports … Read more

PHP: Generating Multiple Random String

Here is a quick way to generate random strings in PHP. I will be showing how you can generate multiple random strings at once. You can specify the number of letters in the random string generated. You can also specify the total number of words you want to generate. I have used str_shuffle function to … Read more

PHP MaxMind GeoIP: Get country, city, postal code & much more by IP Address

This article describes how to get country and city information using MaxMind‘s GeoIP technology. You provide the IP address of the visitor and GeoIP can give you country and city information for that IP address. About MaxMind Founded in 2002, MaxMind is an industry-leading provider of geolocation and online fraud detection tools. MaxMind provides its … Read more