Function cleanstr($string) { $authorised="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/_-+:=@#.0123456789"; $string = trim($string); for ($i = 0; $i < strlen($string); $i++) { $table[$i] = substr($string,$i,1); } #for while (list ($line_num, $line) = each ($table)) { if ($line_num < strlen($string)) {$pos = strpos($authorised,$line);} if (strlen($pos) == 0) {$table[$line_num] = "";} } #while $string = implode($table,''); return $string; } if(isset($init) || isset($reserv) || isset($map)) { if(isset($reserv)) {$reserv=cleanstr($reserv);} else {$reserv="varaukset.txt";} if(isset($map)) {$map=cleanstr($map);} else {$map="kinopalatsi1.txt";} if(isset($init)) {sscanf("$init","%ld",&$init);} else {$init=0;} $debug=".nil_deb.$$.".time()."txt"; system("cat /home/httpd/html/tsh/header.txt"); echo "Generating (about 20 secs)...
\n"; flush(); if(!system("/home/httpd/html/tsh/random_places.pl --noheader --html --init=$init --map=$map --reserv=$reserv --debug=$debug 2>$debug")) { echo "