Category Archives: PHP

How to handle error messages in PHP

Error messages are nightmares to a programmer. Default error messages are annoying and looking ugly. And kind of security threat as well. You probably wish to show a custom message when an error occurred. And tried and failed? I had written this small code snippet for one of my projects and now wondering if this…

A simple two-way function to encrypt or decrypt a string

This function will provide you a two-way system to encrypt a string or decrypt an encrypted string.

So, how to encrypt a string? Just call this function and pass your string. Additionally set your second parameter to ‘e’ (optional). To encrypt Hello World!, write-

It’ll generate a encrypted string RTlOMytOZStXdjdHbDZtamNDWFpGdz09 And, how to…

Transfer large files from one server to another in seconds

Few days ago, I was working for one my clients from the USA. I was asked to transfer his site from BlueHost to HostGator! The task was so easy. I told him that, it may require around one hour to transfer his entire site. But, when I logged in to the cPanel, I wonder that,…