PHP snippet to decrypt AES-256 encrypted string with 32 Bytes key. In order to use decryption php_mcrypt extension need to be installed and activated.
PHP snippet to Encrypt string using AES-256 encryption algorithm with 32 Bytes key. In order to use encryption php_mcrypt extension need to be installed and activated.
In order to use encryption and decryption in PHP, we need to inatall PHP extension mcrypt.
This PHP snippet will list all indexes of a sub-string in parent string.
In PHP, to access session variable stored in $_SESSION array the page must have session_start() method invoked earlier, but when it is called multiple called, it throws PHP Notice "session already started".