Aller, je te file un bout de code que j'ai repeche si ca peut te servir:
Dans un premier fichier tu as:
<?php
$iv = '47032572';
$data = 'hello les amis, comment ca va?';
if ((strlen($data)%8) != 0){
for ($i=0;$i<(strlen($data)%8);$i++)
$data .= ' ';
}
$my_key = 'yKikoXav'; // cle pour crypter
$secret = mcrypt_encrypt(MCRYPT_3DES, $my_key, $data, MCRYPT_MODE_ECB,$iv);
echo bin2hex($secret) . "<br>";// affiche f3f8f6b719f62674a...
echo '<a href="crypt2.php?s='.bin2hex($secret).'">LINK</a>';
?>
En cliquant le lien tu appelles le fichier crypt2.php
<?php
$iv = '47032572';
$s = $_GET[s];
$length = strlen($s);
for ($i = 0; $i<$length; $i+=2)
$enc .= chr(hexdec(substr($s,$i,2)));
$my_key = 'yKikoXav'; // la cle pour decrypter
$crypttext = mcrypt_decrypt(MCRYPT_3DES, $my_key, $enc, MCRYPT_MODE_ECB,$iv);
$crypttext = trim($crypttext);
echo $crypttext; // ton fichier decrypte
?> 