Category: PHP

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 …

How to parse an XML file in PHP using XML parser Read More »

Tagged with: , ,

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 …

How to read a zip file in PHP Read More »

Tagged with: , ,

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 …

How to download a file using CURL in PHP Read More »

Tagged with: , ,

While working on PHP websites you may have come across error messages like Fatal Error, Warning and Notice of one sort or the other. These are fine while the website is in development phase however once the website goes to …

Custom Error Handling in PHP Read More »

Tagged with: ,

There are two ways to pass a variable to a function. Pass by value and pass by reference. Here we’ll discuss passing a variable by reference to a function. When you need to actually modify the value of the variable …

Passing by reference in PHP Read More »

Tagged with:

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 …

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

Tagged with: , ,

If you are working on a website which is hosted on a Windows machine and needs to be browsed in SSL aka Secure Sockets Layer by visitors then you can use the following code to make sure that visitors are …

Redirect from non-SSL to SSL pages in PHP Read More »

Tagged with:

Today I changed the theme of my blog. I sat down in the morning and downloaded WordPress and went to work on developing my own theme. After a couple of hours here is what you see. It is not fancy …

New wordpress theme implemented on AdeelSarfaraz.com Read More »

Tagged with: ,

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 …

Problems while installing Drupal 6.x Read More »

Tagged with: , ,

A client of the company I work for pointed out a problem in which some how the SSL version of his website got indexed into Google and other search engines.  Now this posed a problem for the client as search …

Redirect from SSL URLs to non-SSL URLs in Zencart Read More »

Tagged with: , ,