Tag Archives: tutorials

Add Zone And Domain To DNS Bind Server – Also Includes A Sample DNS Domain Zone File

Overview Welcome to the second of my DNS articles. It is more of a prequel to my first article in which I explained the steps in Creating A DNS Entry For A SubDomain. This article assumes you have already installed bind and it is all running. If not, then you will need to setup bind [...]

Calculate Time Difference Between your Users And Your Server

People access your site aren’t always in the same timezone as you are. Now perhaps you would like to determine what the time is for a user in a different country. Then here is a quick way to find this information out. This example is very useful if you simply want to fetch your clients [...]

PHP Script to Check Remote Server Port or Service is Running

As most webmasters will know, if your website is doing, clients are going to be knocking on your door with pitchforks and torches. Here is a script that allows you to monitor remote ports on a server to make sure that the required services are running such as Apache (port 80), FTP (port 21), SSH [...]

MySQL Copy Table Data To Another Table – Migrating MySQL Data

So you are looking at transferring the data of on MySQL Table into another MySQL Table. This can be surprisingly easier if your tables have the same structure. You can use the query below which will gather the data from one MysQL table and then insert the data into a second table of your choice. [...]

PHP Function To Quickly Implode Array Keys Into A String

In PHP there is a great function for converting a PHP Array into a string (and visa versa) using the function implode() as well as the array_keys() function to fetch the keys of the array. Combining these two functions, we can easily convert the keys of an array into a string. Note that as this [...]

PHP Function To Get File Mime Type

Whenever you need to determine the mime-type of a file you should generally look at the file extension. Below is a pretty straight forward function that will return the mime-type of a file based on its file extension. Note! this is not a guaranteed way to determine the mime-type since people can easily fake the [...]