|
Revision 50002, 1.7 kB
(checked in by GamerZ, 4 weeks ago)
|
Fixed MYSQL Charset Issue
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
@session_start(); |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
$alphanum = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"; |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
$rand = substr(str_shuffle($alphanum), 0, 5); |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
$_SESSION['email_verify'] = md5($rand); |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
$image = imagecreate(55, 15); |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
$bgColor = imagecolorallocate($image, 255, 255, 255); |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
$textColor = imagecolorallocate($image, 0, 0, 0); |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
imagestring($image, 5, 5, 1, $rand, $textColor); |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
header("Cache-Control: no-store, no-cache, must-revalidate"); |
|---|
| 52 |
header("Cache-Control: post-check=0, pre-check=0", false); |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
header("Pragma: no-cache"); |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
header('Content-type: image/jpeg'); |
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
imagejpeg($image); |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
imagedestroy($image); |
|---|
| 65 |
?> |
|---|