Newer
Older
Import / web / puzzlrz.com / sudoku / bin / sudoku.php
@John Ryland John Ryland on 22 Dec 2020 527 bytes import NUC files
<?php /**/ ?><?php
/*
    Sudoku Puzzle generator
    (C) Copyright 2007-2016
    John Ryland <jryland@invertedlogic.com>

    ALL RIGHTS RESERVED
*/

$argsStr = $_GET['game_id'] . ' ' . $_GET['type'] . ' ' . $_GET['difficulty'] . ' ' . $_GET['id'];
$args = explode(' ', trim($argsStr));
$escapedArgs = array();
foreach ($args as $arg) {
  $escapedArgs[] = escapeshellarg($arg);
}

$argsStr = implode(" ", $escapedArgs);
sleep(1);
$tmp = exec("./sudoku " . $argsStr, $possibles);
echo implode("\n", $possibles);
echo "\n";

?>