return strtr(utf8_decode($str), utf8_decode('àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ'), 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
$filename = REMESSA.$DATA['DIA'].$DATA['MES'].$DATA['ANO'].".rm";
An IV is generally a random number that guarantees the encrypted text is unique.
To explain why it's needed, let's pretend we have a database of people's names encrypted with the key 'secret' and no IV.
1 John dsfa9p8y098hasdf 2 Paul po43pokdfgpo3k4y 3 John dsfa9p8y098hasdfIf John 1 knows his cipher text (dsfa9p8y098hasdf) and has access to the other cipher texts, he can easily find other people named John.
Now in actuality, an encryption mode that requires an IV will always use one. If you don't specify an IV, it's automatically set to a bunch of null bytes. Imagine the first example but with a constant IV (00000000).
1 John dsfa9p8y098hasdf 00000000 2 Paul po43pokdfgpo3k4y 00000000 3 John dsfa9p8y098hasdf 00000000