1 <h1
>ASIIArt Evolution Matrix
</h1
>
9 $ratio=9; //probability 1/ratio
11 if(isset($_POST['aart'])) $aart=$_POST['aart'];
12 if(isset($_POST['width'])) $width=$_POST['width'];
13 if(isset($_POST['height'])) $height=$_POST['height'];
14 if(isset($_POST['childs'])) $childs=$_POST['childs'];
15 if(isset($_POST['chars'])) $chars=$_POST['chars'];
16 if(isset($_POST['ratio'])) $ratio=$_POST['ratio'];
18 function mkchild($text, &$chars, $ratio) {
20 for($i=0;$i<$GLOBALS['height'];$i++
) {
21 for($j=0;$j<$GLOBALS['width'];$j++
) {
22 echo($chars[rand(0,strlen($chars)-1)]);
27 if(!rand(0,$GLOBALS['childs']*0.7)) {
28 for($i=0;$i<strlen($chars);$i++
) {
29 $c=$chars[rand(0,strlen($chars)-1)];
30 $text=str_replace($chars[rand(0,strlen($chars)-1)], $c, $text);
34 if(!rand(0,$GLOBALS['childs']*0.4)) {
36 for($i=0;$i<strlen($chars);$i++
) {
37 if(substr_count($text, $chars[$i]) > $d) {
38 $c = $chars[$i]; $d = substr_count($text, $chars[$i]);
41 $text=str_replace($chars[rand(0,strlen($chars)-1)], $c, $text);
44 for($i=0;$i<strlen($text);$i++
){
45 if(!rand(0,$ratio) && $text[$i]!="\n" && $text[$i]!="\r") {
46 $text[$i]=$chars[rand(0,strlen($chars)-1)];
55 <form action
="?" method
="POST" style
="display: inline;">
56 <textarea name
="aart" cols
="<?=$width?>" rows
="<?=$height?>" style
="float: left; display: inline;"><?php
echo($aart); ?
></textarea
><br
/>
57 <input type
="hidden" name
="width" value
="<?=$width ?>">
58 <input type
="hidden" name
="height" value
="<?=$height ?>">
59 Childs
<input type
="text" name
="childs" value
="<?=$childs ?>">
60 Charset
<input type
="text" name
="chars" value
="<?=$chars ?>">
61 Replace
1/<input type
="text" name
="ratio" value
="<?=$ratio ?>">
62 <input type
="submit" value
="SET">
65 <form action
="?" method
="POST" style
="float: left; display: inline;">
66 Width
<input type
="text" name
="width" value
="<?=$width ?>">
67 Height
<input type
="text" name
="height" value
="<?=$height ?>">
68 <input type
="hidden" name
="childs" value
="<?=$childs ?>">
69 <input type
="hidden" name
="chars" value
="<?=$chars ?>">
70 <input type
="hidden" name
="ratio" value
="<?=$ratio ?>">
71 <input type
="submit" value
="RESET">
73 <a href
="https://kyberia.sk/id/4339876/">Info
...</a
>
75 <form action
="?" method
="POST" style
="float: left; display: inline;">
76 /<input type
="submit" value
="RESET SETTINGS">
79 <hr style
="clear: both;"/>
81 for($i=0;$i<$childs;$i++
) {
83 <form action
="?" method
="POST" style
="float: left; display: inline;">
84 <textarea name
="aart" cols
="<?=$width?>" rows
="<?=$height?>"><?php
mkchild($aart, $chars, $ratio); ?
></textarea
><br
/>
85 <input type
="hidden" name
="width" value
="<?=$width ?>">
86 <input type
="hidden" name
="height" value
="<?=$height ?>">
87 <input type
="hidden" name
="childs" value
="<?=$childs ?>">
88 <input type
="hidden" name
="chars" value
="<?=$chars ?>">
89 <input type
="hidden" name
="ratio" value
="<?=$ratio ?>">
90 <input type
="submit" value
="<?=$i?>">
This page took 0.339183 seconds and 4 git commands to generate.