| @@ 84-88 (lines=5) @@ | ||
| 81 | } |
|
| 82 | ||
| 83 | // Set the randomly generated code. |
|
| 84 | if (!isset($_SESSION['session_var'])) |
|
| 85 | { |
|
| 86 | $_SESSION['session_value'] = md5(session_id() . mt_rand()); |
|
| 87 | $_SESSION['session_var'] = substr(preg_replace('~^\d+~', '', sha1(mt_rand() . session_id() . mt_rand())), 0, mt_rand(7, 12)); |
|
| 88 | } |
|
| 89 | $sc = $_SESSION['session_value']; |
|
| 90 | } |
|
| 91 | ||
| @@ 121-125 (lines=5) @@ | ||
| 118 | error_reporting($temp); |
|
| 119 | } |
|
| 120 | ||
| 121 | if (!isset($_SESSION['session_value'])) |
|
| 122 | { |
|
| 123 | $_SESSION['session_var'] = substr(md5(mt_rand() . session_id() . mt_rand()), 0, rand(7, 12)); |
|
| 124 | $_SESSION['session_value'] = md5(session_id() . mt_rand()); |
|
| 125 | } |
|
| 126 | $sc = $_SESSION['session_value']; |
|
| 127 | } |
|
| 128 | ||