Ik heb heel wat sites afgezocht zo ook GoT en heb al heel wat veranderd maar niets blijkt te helpen.
met phpinfo()
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
Heb php 4.3.0 draaien, dus dat moet wel goed zitten. Heb in php.ini zelf ook al de ; weg gehaald bij gd2.dll.
Heb de font zelf al in verschillende mappen gehad maar ook dat werkt niet.
Maar krijg nog steeds de fout dat hij mijn font niet kan vinden.
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
| <?php function code( $aantal ) { $keys = array_merge( range('a','z') , range(1,9) ); $hash = NULL; for( $i = 0; $i <= $aantal; $i++ ) { $hash[] = $keys[ rand(0, 34) ]; } return $hash; } header("content-type: image/png"); $image = imagecreate(150, 35); $bg = imagecolorallocate($image, rand(200, 255), rand(200, 255), rand(200, 197)); $zwart = imagecolorallocate($image, 125, 125, 125); $grijs = imagecolorallocate($image, 102, 102, 102); $font = realpath("verdana.ttf"); $tekst = code( 6 ); $num_line = rand (10, 25); for($i = 0; $i < $num_line; $i++) { $kleur = imagecolorallocate($image, rand(150, 255), rand(150, 255), rand(150, 255)); imageline($image, rand(0, 150), rand(0, 35), rand(0, 150), rand(0, 35), $kleur); } ImagePolygon($image, array( 1, 1, 149, 1, 149, 34, 1, 34, ), 4, $zwart); ImagePolygon($image, array( 3, 3, 147, 3, 147, 32, 3, 32, ), 4, $grijs); $_SESSION['code'] = implode('', $tekst); $int_x = 10; foreach( $tekst as $letter) { ImageTTFText($image, 15, rand(-30, 30), $int_x, 24, $zwart, $font, $letter); $int_x += rand(15, 25); } ImagePNG($image); ImageDestroy($image); ?> |
met phpinfo()
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled
Heb php 4.3.0 draaien, dus dat moet wel goed zitten. Heb in php.ini zelf ook al de ; weg gehaald bij gd2.dll.
Heb de font zelf al in verschillende mappen gehad maar ook dat werkt niet.
Maar krijg nog steeds de fout dat hij mijn font niet kan vinden.
[ Voor 3% gewijzigd door SoeperKees op 10-05-2007 17:36 ]