fbpx

Category: Web Development

Generate Dynamic Sitemap for Specific filetypes inside a folder recursively using php

Today, I needed to create an xml sitemap for all the pdf files under a directory as well as inside the sub directories of that directory. Doing that manually requires lot’s of time and energy and that is a complete waste. So, I started digging and created a very small php script that will list…
Read more

Example code of Google Recaptcha implementation with php curl

Google reCaptcha is the most used captcha for preventing spam on web forms. Its a very useful thing to keep website, specially the forms which works with data. If you want to know more about recaptcha, please visit the reCaptcha website. Installing and using reCaptcha is easy and google already has a very informative documentation…
Read more

Display current website ip on browser toolbar

I was working to migrate a website from a server to another, After doing migration of all the files and database I’ve pointed the domain to the new server. That’s when the weird things starts. Normally dns propagation takes some time. In some cases it takes only a few minutes but in other cases it…
Read more

Ways to convert a string variable to integer in Javascript

In  this article I am going to write about converting a javascript variable to integer. Its important to have both variable as integer when you’re doing calculations using javascript. I’ll share 2 ways here in this article, there might be other ways as well. Please feel free to share your favourite way in comments section.…
Read more

Zip and Unzip files with FTP client/Filezilla

As a Freelance Web Developer, I work on many hosting panels, I have to transfer sites from one server to another very frequently. While doing this, I’ve faced a very common problem many times in last few years. Some hosting company doesn’t provide a rich file manager or in some cases client gives only ftp account…
Read more

Create Zip file with content of current Directory with php – ZipCF

A few days ago I’ve shared a php script to unzip files. After that I received a few queries for a different script that will create zip files with content of current directory. And that’s why I am writing this article today. Today, I’m going to share a php script that will create zip file…
Read more

Change start point of auto increment value for a mysql table from PhpmyAdmin

In some cases you may need to start auto increment value of a table in mysql database. I am going to share a very simple way to do that here. Open phpmyadmin and click on the Database name from left bar. Now, once you have the Database open, click on SQL on top menu. Put…
Read more

Retrieve Total Number of Elements in an array php

Sometimes you may need to know how many elements an array is containing. For example, you got result from a mysql query in an array. Now you want to show total number of results returned by the query. There’s a function in php called count() which can do it for you very easily. Use the…
Read more