Tag: php web developer

Adeel Sarfraz does freelance website design/development/marketing along with mobile applications

Recursion example using PHP

Recursion is a data structure by which a function is called several times till the condition which calls the function becomes true. I have seldom used it while coding but I would like to show you one particular instance where I used it to display a category level structure in a drop down. First you need…
Read more


September 27, 2012 0

Wish happy birthday to your customers from Zen Cart

Zen Cart by default requests a customer to enter his/her date of birth during registration. This is optional of course and can be removed from the Zen Cart admin panel. However one can make good use of this to regularly wish their customers a happy birthday thereby keeping in touch with them. I have developed…
Read more


June 28, 2012 0

How to parse large sized XML files using PHP XML Parser

I was recently provided a Google Base XML file by a client to load on one of his websites. The size of the XML file was over 20MB.  The format of the XML file was as follows: <?xml version=”1.0″?> <rss version=”2.0″ xmlns:g=”http://base.google.com/ns/1.0″ xmlns:c=”http://base.google.com/cns/1.0″> <channel> <title>Company Name</title> <description>Company Name Description</description> <link>www.companyname.com</link> <item> <g:id>TEST</g:id> <title>Test Product Name</title>…
Read more


January 18, 2012 0

Steps to implement mySQL FULLTEXT

mySQL has full text indexing and searching support from version 5.0 onwards however there are some limitations. If you need to implement full text indexing then please review points given below: 1. mySQL allows full text indexing on MyISAM tables and not any other table type. If you try to create a full text index…
Read more


January 10, 2012 0

How to parse an XML file in PHP using XML parser

PHP offers a new and fast way to parse XML files. This approach makes it easier to parse very large XML files in a couple of seconds. Here goes the code to parse a sample XML file. The XML in that file is also given below <!– The XML to be parsed with the code…
Read more


March 11, 2009 0

How to read a zip file in PHP

If you want to read all the files a zip file contains and extract those files to a location on your computer then you can do the following. First of all make sure that the zip package is included in your PHP distribution. I use Windows so Windows users can just uncomment the entry for…
Read more


March 11, 2009 0

How to download a file using CURL in PHP

Downloading a file is easy but what if you had to download a file through your page and save it on our machine. Well here goes. We use our friendly CURL library in PHP for this. You can use the following code to download and save the file on your machine <?php $ch = curl_init();…
Read more


March 11, 2009 0

How to use AJAX to check user already exists or not in PHP

AJAX is a wonderful technology that provides the visitor with a “no refresh” experience on the web. With the advent and popularity of Web 2.0 this technology is making progress by leaps and bounds. If you would like to verify whether a user is registered on your website or not then you can use the…
Read more


February 9, 2009 0

Problems while installing Drupal 6.x

If you are facing problem on step 3 of Drupal installation where you enter your database name, username and password and after clicking Continue button the page just refreshes blanking out everything then the following fix applies to you if are on Windows 2003. This problem has also been mentioned on Drupal website 1. Go…
Read more


January 24, 2009 0