Category Archives: PHP

Ncrypt : A 2-way encryption library for PHP

I have released Ncrypt, a 2-way encryption library for PHP. Using Ncrypt, you can encrypt a string and decrypt an encrypted string. Steps 1. Include the class 1.a. Option 1 (using Composer) Add the following to your composer.json file-

Run composer install command. Include your autoloader file (if not already), like this-

1.b.…

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

Update: I have released Ncrypt, a library (OOP based) that facilitates the same. See here 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).…

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,…