- substr: documentation ( source)
- strpos: documentation ( source)
- sha1: documentation ( source)
<?php
$key = sha1("");
$data = 9856748;
$i = 0;
$str = "";
while ($i < strlen($key)) {
if (strpos($str, $key[$i]) === false) {
$str .= $key[$i];
}
$i++;
}
unset($key);$key = $str;unset($str);unset($i);
$i = 0;
$str = $data."";
$rtn = "";
while ($i < strlen($str)) {
$rtn .= substr($key,$str[$i],1);
$i++;
}
echo $rtn;