Subversion Repositories php_antispam

Rev

Rev 6 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 7
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
/*
3
/*
4
 * ViaThinkSoft Anti-Spam Script for PHP
4
 * ViaThinkSoft Anti-Spam Script for PHP
5
 * (C) 2009-2022 ViaThinkSoft
5
 * (C) 2009-2022 ViaThinkSoft
6
 * Revision: 2022-01-09 (Version 4.1)
6
 * Revision: 2022-11-05 (Version 4.1.1)
7
 * License: Apache 2.0 License
7
 * License: Apache 2.0 License
8
 */
8
 */
9
 
9
 
10
class VtsAntiSpam4 {
10
class VtsAntiSpam4 {
11
 
11
 
Line 17... Line 17...
17
 
17
 
18
        private static function randomize() {
18
        private static function randomize() {
19
                // Anfagswert über aktuelle Mikrosekunde setzen
19
                // Anfagswert über aktuelle Mikrosekunde setzen
20
                // http://de2.php.net/manual/de/function.srand.php
20
                // http://de2.php.net/manual/de/function.srand.php
21
                list($usec, $sec) = explode(' ', microtime());
21
                list($usec, $sec) = explode(' ', microtime());
22
                $seed = (int)($sec + ((float)$usec * 100000));
22
                $seed = (int)((int)$sec + ((float)$usec * 100000));
23
                srand($seed);
23
                srand($seed);
24
        }
24
        }
25
 
25
 
26
        private function RandomString($len) {
26
        private function RandomString($len) {
27
                // http://www.jonasjohn.de/snippets/php/rand-str.htm
27
                // http://www.jonasjohn.de/snippets/php/rand-str.htm