[GD]Error
Code (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?
header ("Content-type: image/png");
$imagepath = "backimg.png";
$UserAgent = $_SERVER['HTTP_USER_AGENT'];
function getOs() {
global $HTTP_USER_AGENT;
$os = "een niet herkend platform";
if (eregi("(win|windows)[ ]*((nt)*[ /]*([0-9]+(.?[0-9]+))*)", $HTTP_USER_AGENT, $regs)){
if (eregi("(win|windows)[ ](95)", $HTTP_USER_AGENT)){
$os = "Windows 95";
}elseif (eregi("(win|windows)[ ](9x)[ ](4.90)", $HTTP_USER_AGENT)){
$os = "Windows Me";
}elseif (eregi("(win|windows)[ ](9Cool", $HTTP_USER_AGENT)){
$os = "Windows 98";
}elseif (eregi("(win|windows)[ ](NT)", $HTTP_USER_AGENT)){
if (eregi("(win|windows)[ ](NT)[ ](5.1)", $HTTP_USER_AGENT)){
$os = "Windows XP";
}elseif (eregi("(win|windows)[ ](NT)[ ](5.0)", $HTTP_USER_AGENT)){
$os = "Windows 2000";
}else{
$os = "Windows NT";
}
}else{
$os = "Windows (unknown)";
}
}elseif (stristr($HTTP_USER_AGENT, "Linux")){
$os = "Linux";
}elseif (stristr($HTTP_USER_AGENT, "Unix")){
$os = "Unix";
}elseif (stristr($HTTP_USER_AGENT, "Mac")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "PPC")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "HP")){
$os = "HPuX";
}elseif (stristr($HTTP_USER_AGENT, "SunOS")){
$osr = "SunOS";
}else{
$os = "Unknown";
}
return $os;
}
if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "MSIE")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "Mozilla")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera/([0-9].[0-9]{0,2})/i", $UserAgent, $found)){
$Browser = "Opera " . $found[1];
}else if(stripos("/Netscape[0-9]/([0-9]{1,2}.[0-9]{1,2})/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/Mozilla/([0-9]{1}.[0-9]{1,2}) [en]/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/MSIE ([0-9]{1,2})/i", $UserAgent, $found)){
$Browser = $found[0];
}else{
$Browser = $UserAgent;
}
if($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]!=""){
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$Proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}else{
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}
$Host = gethostbyaddr($IP);
$s = preg_split("/./", $Host);
$i = count($s);
$x = $i - 1;
$n = $i - 2;
$ISP = $s[$n] . "." . $s[$x];
$os = getOs();
$uur = date("G", time());
$s1 = "Je bent " . $IP . ". Je provider is " . $ISP;
$s2 = "Je gebruikt " . $os . " en surft met " . $Browser;
$im = imagecreatefrompng($imagepath);
$tc = imagecolorclosest ($im, 0, 0, 0);
//
// imagettftext ($im, tekstgroote, diagonaal, links, boven, $tc, "vedana.ttf", "Lolzzzman" ); ////
//
// HIER KOMEN DE EERSTE EN TWEEDE REGEL OP HET PLAATJE
imagettftext ($im, 7, 0, 13, 15, $tc, "verdana.ttf", $s1);
imagettftext ($im, 7, 0, 17, 26, $tc, "verdana.ttf", $s2 );
// HIER KOMT DE DERDE REGEL OP HET PLAATJE MET DE TIJDSGROET
if($uur >= 18 && $uur < 0) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Avond!!" );
}
elseif($uur >= 3 && $uur < 12) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Morgen!" );
}
elseif($uur >= 12 && $uur < 18) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Middag!" );
}
else
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Nacht!!" );
// EINDE
imagepng($im,'','');
?>
header ("Content-type: image/png");
$imagepath = "backimg.png";
$UserAgent = $_SERVER['HTTP_USER_AGENT'];
function getOs() {
global $HTTP_USER_AGENT;
$os = "een niet herkend platform";
if (eregi("(win|windows)[ ]*((nt)*[ /]*([0-9]+(.?[0-9]+))*)", $HTTP_USER_AGENT, $regs)){
if (eregi("(win|windows)[ ](95)", $HTTP_USER_AGENT)){
$os = "Windows 95";
}elseif (eregi("(win|windows)[ ](9x)[ ](4.90)", $HTTP_USER_AGENT)){
$os = "Windows Me";
}elseif (eregi("(win|windows)[ ](9Cool", $HTTP_USER_AGENT)){
$os = "Windows 98";
}elseif (eregi("(win|windows)[ ](NT)", $HTTP_USER_AGENT)){
if (eregi("(win|windows)[ ](NT)[ ](5.1)", $HTTP_USER_AGENT)){
$os = "Windows XP";
}elseif (eregi("(win|windows)[ ](NT)[ ](5.0)", $HTTP_USER_AGENT)){
$os = "Windows 2000";
}else{
$os = "Windows NT";
}
}else{
$os = "Windows (unknown)";
}
}elseif (stristr($HTTP_USER_AGENT, "Linux")){
$os = "Linux";
}elseif (stristr($HTTP_USER_AGENT, "Unix")){
$os = "Unix";
}elseif (stristr($HTTP_USER_AGENT, "Mac")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "PPC")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "HP")){
$os = "HPuX";
}elseif (stristr($HTTP_USER_AGENT, "SunOS")){
$osr = "SunOS";
}else{
$os = "Unknown";
}
return $os;
}
if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "MSIE")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "Mozilla")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera/([0-9].[0-9]{0,2})/i", $UserAgent, $found)){
$Browser = "Opera " . $found[1];
}else if(stripos("/Netscape[0-9]/([0-9]{1,2}.[0-9]{1,2})/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/Mozilla/([0-9]{1}.[0-9]{1,2}) [en]/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/MSIE ([0-9]{1,2})/i", $UserAgent, $found)){
$Browser = $found[0];
}else{
$Browser = $UserAgent;
}
if($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]!=""){
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$Proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}else{
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}
$Host = gethostbyaddr($IP);
$s = preg_split("/./", $Host);
$i = count($s);
$x = $i - 1;
$n = $i - 2;
$ISP = $s[$n] . "." . $s[$x];
$os = getOs();
$uur = date("G", time());
$s1 = "Je bent " . $IP . ". Je provider is " . $ISP;
$s2 = "Je gebruikt " . $os . " en surft met " . $Browser;
$im = imagecreatefrompng($imagepath);
$tc = imagecolorclosest ($im, 0, 0, 0);
//
// imagettftext ($im, tekstgroote, diagonaal, links, boven, $tc, "vedana.ttf", "Lolzzzman" ); ////
//
// HIER KOMEN DE EERSTE EN TWEEDE REGEL OP HET PLAATJE
imagettftext ($im, 7, 0, 13, 15, $tc, "verdana.ttf", $s1);
imagettftext ($im, 7, 0, 17, 26, $tc, "verdana.ttf", $s2 );
// HIER KOMT DE DERDE REGEL OP HET PLAATJE MET DE TIJDSGROET
if($uur >= 18 && $uur < 0) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Avond!!" );
}
elseif($uur >= 3 && $uur < 12) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Morgen!" );
}
elseif($uur >= 12 && $uur < 18) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Middag!" );
}
else
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Nacht!!" );
// EINDE
imagepng($im,'','');
?>
Gewijzigd op 01/01/1970 01:00:00 door John Doe
http://arjan.i-cey.net/test.php
Code (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
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
<?php
$browser = get_browser($_SERVER['HTTP_USER_AGENT'], true);
$font = './verdana.ttf';
//Dit is de tekst die op het plaatje komt
$tekst = 'Je gebruikt '.$browser['platform'].' en surft met '.$browser['parent'];
//Dit word gebruikt om uit te rekenen hoe lang het plaatje moet worden
$bbox = imagettfbbox(10, 0, $font, $tekst);
//Afbeelding aanmaken en een tweetal kleuren defineren
$img = imagecreatetruecolor($bbox[2] - $bbox[0], 15);
$wit = imagecolorallocate($img, 255, 255, 255);
$rood = imagecolorallocate($img, 255, 0, 0);
//Achtergrond opvullen met wit
imagefilledrectangle($img, 0, 0, $bbox[2] - $bbox[0], 15, $wit);
//Tekst erop plakken
imagefttext($img, 10, 0, 1, 11, $rood, $font, $tekst);
//Headers versturen
header('Content-Type: image/png');
//Plaatje versturen & verwijderen
imagepng($img);
imagedestroy($img);
?>
$browser = get_browser($_SERVER['HTTP_USER_AGENT'], true);
$font = './verdana.ttf';
//Dit is de tekst die op het plaatje komt
$tekst = 'Je gebruikt '.$browser['platform'].' en surft met '.$browser['parent'];
//Dit word gebruikt om uit te rekenen hoe lang het plaatje moet worden
$bbox = imagettfbbox(10, 0, $font, $tekst);
//Afbeelding aanmaken en een tweetal kleuren defineren
$img = imagecreatetruecolor($bbox[2] - $bbox[0], 15);
$wit = imagecolorallocate($img, 255, 255, 255);
$rood = imagecolorallocate($img, 255, 0, 0);
//Achtergrond opvullen met wit
imagefilledrectangle($img, 0, 0, $bbox[2] - $bbox[0], 15, $wit);
//Tekst erop plakken
imagefttext($img, 10, 0, 1, 11, $rood, $font, $tekst);
//Headers versturen
header('Content-Type: image/png');
//Plaatje versturen & verwijderen
imagepng($img);
imagedestroy($img);
?>
Gewijzigd op 01/01/1970 01:00:00 door Arjan Kapteijn
Even de PHP website erbij pakken;
Note: In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system.
browscap.ini is not bundled with PHP, but you may find an up-to-date » php_browscap.ini file here.
While browscap.ini contains information on many browsers, it relies on user updates to keep the database current. The format of the file is fairly self-explanatory.
Even de juiste browscap.ini downloaden en in je php.ini daar naar verwijzen (of bovenaan je script een ini_set(), maar dat is minder netjes).
voorbeeld
Alleen bij OS zegt hij unknown en bij provider .
Hier snap ik niks meer van maar ik heb mijn script iets aangepast waardoor ik geen errors meer krijg. Alleen bij OS zegt hij unknown en bij provider .
Code (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?
header ("Content-type: image/png");
$imagepath = "backimg.png";
$UserAgent = $_SERVER['HTTP_USER_AGENT'];
function getOs() {
global $HTTP_USER_AGENT;
$os = "een niet herkend platform";
if (eregi("(win|windows)[ ]*((nt)*[ /]*([0-9]+(.?[0-9]+))*)", $HTTP_USER_AGENT, $regs)){
if (eregi("(win|windows)[ ](95)", $HTTP_USER_AGENT)){
$os = "Windows 95";
}elseif (eregi("(win|windows)[ ](9x)[ ](4.90)", $HTTP_USER_AGENT)){
$os = "Windows Me";
}elseif (eregi("(win|windows)[ ](9Cool", $HTTP_USER_AGENT)){
$os = "Windows 98";
}elseif (eregi("(win|windows)[ ](NT)", $HTTP_USER_AGENT)){
if (eregi("(win|windows)[ ](NT)[ ](5.1)", $HTTP_USER_AGENT)){
$os = "Windows XP";
}elseif (eregi("(win|windows)[ ](NT)[ ](5.0)", $HTTP_USER_AGENT)){
$os = "Windows 2000";
}else{
$os = "Windows NT";
}
}else{
$os = "Windows (unknown)";
}
}elseif (stristr($HTTP_USER_AGENT, "Linux")){
$os = "Linux";
}elseif (stristr($HTTP_USER_AGENT, "Unix")){
$os = "Unix";
}elseif (stristr($HTTP_USER_AGENT, "Mac")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "PPC")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "HP")){
$os = "HPuX";
}elseif (stristr($HTTP_USER_AGENT, "SunOS")){
$osr = "SunOS";
}else{
$os = "Unknown";
}
return $os;
}
if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "MSIE")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "Mozilla")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera/([0-9].[0-9]{0,2})/i", $UserAgent, $found)){
$Browser = "Opera " . $found[1];
}else if(stripos("/Netscape[0-9]/([0-9]{1,2}.[0-9]{1,2})/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/Mozilla/([0-9]{1}.[0-9]{1,2}) [en]/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/MSIE ([0-9]{1,2})/i", $UserAgent, $found)){
$Browser = $found[0];
}else{
$Browser = $UserAgent;
}
if($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]!=""){
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$Proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}else{
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}
$Host = gethostbyaddr($IP);
$s = preg_split("/./", $Host);
$i = count($s);
$x = $i - 1;
$n = $i - 2;
$ISP = $s[$n] . "." . $s[$x];
$os = getOs();
$uur = date("G", time());
$s1 = "Je bent " . $IP . ". Je provider is " . $ISP;
$s2 = "Je gebruikt " . $os . " en surft met " . $Browser;
$im = imagecreatefrompng($imagepath);
$tc = imagecolorclosest ($im, 0, 0, 0);
//
// imagettftext ($im, tekstgroote, diagonaal, links, boven, $tc, "vedana.ttf", "Lolzzzman" ); ////
//
// HIER KOMEN DE EERSTE EN TWEEDE REGEL OP HET PLAATJE
imagettftext ($im, 7, 0, 13, 15, $tc, "verdana.ttf", $s1);
imagettftext ($im, 7, 0, 17, 26, $tc, "verdana.ttf", $s2 );
// HIER KOMT DE DERDE REGEL OP HET PLAATJE MET DE TIJDSGROET
if($uur >= 18 && $uur < 0) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Avond!!" );
}
elseif($uur >= 3 && $uur < 12) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Morgen!" );
}
elseif($uur >= 12 && $uur < 18) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Middag!" );
}
else
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Nacht!!" );
// EINDE
imagepng($im,'','');
?>
header ("Content-type: image/png");
$imagepath = "backimg.png";
$UserAgent = $_SERVER['HTTP_USER_AGENT'];
function getOs() {
global $HTTP_USER_AGENT;
$os = "een niet herkend platform";
if (eregi("(win|windows)[ ]*((nt)*[ /]*([0-9]+(.?[0-9]+))*)", $HTTP_USER_AGENT, $regs)){
if (eregi("(win|windows)[ ](95)", $HTTP_USER_AGENT)){
$os = "Windows 95";
}elseif (eregi("(win|windows)[ ](9x)[ ](4.90)", $HTTP_USER_AGENT)){
$os = "Windows Me";
}elseif (eregi("(win|windows)[ ](9Cool", $HTTP_USER_AGENT)){
$os = "Windows 98";
}elseif (eregi("(win|windows)[ ](NT)", $HTTP_USER_AGENT)){
if (eregi("(win|windows)[ ](NT)[ ](5.1)", $HTTP_USER_AGENT)){
$os = "Windows XP";
}elseif (eregi("(win|windows)[ ](NT)[ ](5.0)", $HTTP_USER_AGENT)){
$os = "Windows 2000";
}else{
$os = "Windows NT";
}
}else{
$os = "Windows (unknown)";
}
}elseif (stristr($HTTP_USER_AGENT, "Linux")){
$os = "Linux";
}elseif (stristr($HTTP_USER_AGENT, "Unix")){
$os = "Unix";
}elseif (stristr($HTTP_USER_AGENT, "Mac")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "PPC")){
$os = "MacOs";
}elseif (stristr($HTTP_USER_AGENT, "HP")){
$os = "HPuX";
}elseif (stristr($HTTP_USER_AGENT, "SunOS")){
$osr = "SunOS";
}else{
$os = "Unknown";
}
return $os;
}
if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "MSIE")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera ([0-9].[0-9]{0,2})/i", $UserAgent, $found) && strstr($UserAgent, "Mozilla")){
$Browser = "Opera " . $found[1];
}else if(stripos("/Opera/([0-9].[0-9]{0,2})/i", $UserAgent, $found)){
$Browser = "Opera " . $found[1];
}else if(stripos("/Netscape[0-9]/([0-9]{1,2}.[0-9]{1,2})/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/Mozilla/([0-9]{1}.[0-9]{1,2}) [en]/i", $UserAgent, $found)){
$Browser = "Netscape " . $found[1];
}else if(stripos("/MSIE ([0-9]{1,2})/i", $UserAgent, $found)){
$Browser = $found[0];
}else{
$Browser = $UserAgent;
}
if($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]!=""){
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$Proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}else{
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];
}
$Host = gethostbyaddr($IP);
$s = preg_split("/./", $Host);
$i = count($s);
$x = $i - 1;
$n = $i - 2;
$ISP = $s[$n] . "." . $s[$x];
$os = getOs();
$uur = date("G", time());
$s1 = "Je bent " . $IP . ". Je provider is " . $ISP;
$s2 = "Je gebruikt " . $os . " en surft met " . $Browser;
$im = imagecreatefrompng($imagepath);
$tc = imagecolorclosest ($im, 0, 0, 0);
//
// imagettftext ($im, tekstgroote, diagonaal, links, boven, $tc, "vedana.ttf", "Lolzzzman" ); ////
//
// HIER KOMEN DE EERSTE EN TWEEDE REGEL OP HET PLAATJE
imagettftext ($im, 7, 0, 13, 15, $tc, "verdana.ttf", $s1);
imagettftext ($im, 7, 0, 17, 26, $tc, "verdana.ttf", $s2 );
// HIER KOMT DE DERDE REGEL OP HET PLAATJE MET DE TIJDSGROET
if($uur >= 18 && $uur < 0) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Avond!!" );
}
elseif($uur >= 3 && $uur < 12) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Morgen!" );
}
elseif($uur >= 12 && $uur < 18) {
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Middag!" );
}
else
imagettftext ($im, 7, 0, 17, 37, $tc, "verdana.ttf", "Goede Nacht!!" );
// EINDE
imagepng($im,'','');
?>
Gewijzigd op 01/01/1970 01:00:00 door John Doe
Waar komt bijv. die $HTTP_USER_AGENT vandaan?