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 How to parse an XML file in PHP using XML parser
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 How to read a zip file in PHP
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 login … Read more How to know when GoogleBot last visited my website
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 How to download a file using CURL in PHP
Since Google came out with the Google Sitemap tool many website owners who were having problems of getting their websites indexed on Google started using it. However, Google Sitemap required website owners to submit their website sitemap in XML format. As most of them were not technical they turned to their technical support team or … Read more Google presents Google Sitemap Generator
To be frank I used to think that ASP.NET menu control was complex and hard to use. Boy was I wrong!!! ASP.NET provides a menu control which allows you set all its visual properties and menu items and voila start using them. Not only that you can create a theme for it and with a … Read more How to create and use menu in ASP.NET?
The <asp:Checkbox> is one of those controls in ASP.NET which does not have a default Value property in which you can store a value and retrieve it upon postback. This becomes a problem in cases where the value has to be saved into the database or an action depends on the condition of that value. … Read more How to add a value to asp:Checkbox control and retrieve it on postback?
If you have developed a website in mySQL 5.x and your client somehow manages to purchase a hosting which supports mySQL 4.x (don’t know how this could happen but it happened to me once) then you can do the following to generate SQL script in the right version by using mySQLDump Go to the command … Read more Generate mySQL dump for mySQL 4.x and below
While working on a PHP script I encountered a problem which was working fine on IE but not on Firefox. I was trying to display a list of records through AJAX and user had to select any one to proceed further. To make sure that the user actually selected and then proceeded I placed a … Read more Firefox not detecting form elements populated through AJAX