- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
<?php
function string_size($string){
$temporary_file = md5(rand().rand()).".temporary";
$a=fopen($temporary_file,"w+");
fwrite($a,$string);
$size = filesize($temporary_file);
fclose($a);
unset($temporary_file);
return $size;
}
?>
Исходный код моей программы: https://github.com/angrybird/encrypt-archive (Осторожно: Много говнокода!)
всем-похуй.eps
Для отдачи зашифрованных архивов прямо в браузер.
Вот кусок кода с гитхаба:
$archive=decrypt(file_get_contents("zh.e ncrypted"),"$password");
$archive_name="Lily-pack.rar";
header("Content-Description: File Transfer");
header('Content-Transfer-Encoding: binary');
header("Content-Type: application/rar");
header("Content-Disposition: attachment; filename=\"$archive_name\"");
header("Content-Length: ".string_size("$archive");
echo $archive;
p.s. http://govnokod.ru/12726 оцените полный код этого "творения" - "одноразовое шифрование архивов"
Подойдет?
(без фотоаппарата, правда...)
http://demotivation.me/images/20090514/klkp70a0jsqb.jpg
http://img.1001mem.ru/posts/1082000/1081504.jpg