Home » Archive

Articles in the PHP Category


[6 Aug 2013 | One Comment]

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, serving as an alternative to XML. [via Wikipedia:JSON]

Linux, MySQL, PHP, Ubuntu »

[3 Dec 2012 | One Comment]

Here are step-by-step commands about installing apache, php, mysql, and phpmyadmin on ubuntu.
1) Open Terminal
– Press:


[26 Nov 2012 | Comments Off on 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.


[5 Dec 2011 | Comments Off on 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.

Linux, PHP, Ubuntu »

[28 Nov 2011 | Comments Off on 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.


[24 Oct 2011 | One Comment]

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 nearly all possiblities to send email: mail(), Sendmail, qmail & direct to SMTP server


[8 Sep 2011 | One Comment]

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 shuffle the string and then substr function is used to fetch a portion of the string.


[2 Aug 2011 | 8 Comments]

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

Magento, PHP »

[24 May 2011 | Comments Off on Running Magento 1.3 and older versions in PHP 5.3]

Magento works fine in PHP 5.3 from versions 1.4 and later. But, error is displayed in different pages when we use older versions (prior to 1.4) of Magento in PHP 5.3.
This is because some php functions are deprecated in PHP 5.3 and those functions have been used in Magento Older Versions.

PHP, Review »

[21 Mar 2011 | 3 Comments]

The ionCube PHP Encoder makes it easy to protect your PHP 4 & 5 source code, including sources using the PHP 5.3 language, from easy observation, theft and change. Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and others.
Introduction: http://www.ioncube.com/sa_encoder.php

PHP, Review »

[7 Feb 2011 | 5 Comments]

Here, I will be writing about two pdf creation PHP Classes. They are FPDF and TCPDF. With these classes, you can quickly, easily and effectively generate PDF files.
FPDF is smaller in size compared to TCPDF. But, in functionalities, TCPDF wins. TCPDF has lots of features and functionalities.

PHP, Review »

[2 Feb 2011 | One Comment]

As far as I see, I find phpThumb() as the best of all PHP thumbnail image generator. It has lots of thumbnail generation features. You can create thumbnail in a number of ways with phpThumb().

phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. Basic functionality is available even if GD functions are not installed (as long as ImageMagick is installed).


[25 Oct 2010 | 27 Comments]

In this tutorial, I will be showing you how you can fetch any company’s data from Yahoo! Finance.


[18 Oct 2010 | 3 Comments]

In this article, I will be showing you how to read and write CSV file with PHP.
I have used PHP function fgetcsv to read CSV fields and fputcsv to write on CSV file.

fgetcsv — Gets line from file pointer and parse for CSV fields.
fgetcsv() parses the line it reads for fields in CSV format and returns an array containing the fields read.
This works on PHP 4 and PHP 5.


[11 Oct 2010 | 10 Comments]

Suppose you are on a page : http://example.com/category/php/
Now, the base URL or the main URL for the above link is : http://example.com
Similarly, in the case of local machine (localhost),
Suppose you are in the page : http://localhost/myproject/index.php?id=8
Here, the base or main URL is : http://localhost/myproject