Categories

How to parse an XML file in PHP

Share

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 [...]

How to read a zip file in PHP

Share

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 [...]

How to know when GoogleBot last visited my website

Share

If you want to know when GoogleBot visited your website recently you can use any of the following ways to do so

1. Go through your web logs which Apache/IIS generate for your website. Scan for GoogleBot. A very crude way indeed. 2. If you have signed up for Google Sitemaps then you can [...]