Generator Puzzle Word 8-way PHP

8-way generator


8-way Generator in PHP, HTML allows:
  • Upload a maximum of 20 words a user should guess, or have them put in the system automatically (if the database is full enough)
  • The database also stores all new words the administrator enters into the generator, full support for diacritics.
  • The output is an eight-symbol that can be printed and solved, or cut out in a PC program and solved by some graphics program (Sketch, Photoshop, Zoner, etc.).
  • The system keeps the generated secret database, can be retrieved.
  • The administrator has a login that logs into the site. It works under both PHP 5.6 and PHP 7.
  • 8-way maximum - 20x20 letters
  •   

    Source code for base - concept - variable-length 1-line logic - search word: ARDUINO

       Output: CKTBPJIYHGXUQGKLSYFFIBTZNXVVAMADELRMPSQDONWWCJRHOARDUINOCJVBRKMUMJYXHENKRWPUWEXODTFLDZBAGLNQPFISOHYSVTQG
       <?php		
    $slovo = "ARDUINO";
    $dlzka1 = rand(1, 50);
    $dlzka2 = rand(1, 50);
    function generateRandomString($length) {
      return substr(str_shuffle(str_repeat($x='ABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length);
    }
    echo generateRandomString($dlzka1);
    echo $slovo;
    echo generateRandomString($dlzka2);
    ?>
      

    Possible HTML + addition of 8 directions can look like this: