'PHP script met bijlagen
onbekende gebruiker.
In de dir staat een html file, en een bedankt file.
Hij is gechmod naar 777 ( de dir en de files)
Mijn server ondersteunt PHP. bij$refferers heb ik ook mijn servernaam al ingevuld, zonder resultaat
De url waar het script staat:
http://www.volierevogels.nl/formulier/mailformulier.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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<?
/*****************************************************************************
* *
* C O N F I G U R A T I O N *
* *
*****************************************************************************/
// email adres waar naar toe moet worden gezonden //////////////////////////////
// als leeg, dan wordt veld from gebruikt ('send_to' veld)
$send_to = "Webmaster www.volierevogels.nl <[email protected]>";
// set $send_cc adres als je een copy wilt ontvangen of mail naar ander adressen
// als voorbeeld: $send_cc = array('[email protected]', '[email protected]');
// of laat het leeg
$send_cc = array();
// Onderwerp. als leeg, gebruikt veld from ('subject' veld)
$subject = "Koopje";
// Toestaan Referres. laat leeg of maak lijst met domeinnamen
$referrers = array('');
// Bijlage
$attachment_enabled = 1;
////// Database - maak CSV file met data van verzonden formulieren /////////////
$database_enabled = 0;
$database_file = 'email.csv';
// Verzamel velden voor in database
// $database_velden = '*' - betekend alle velden, als in formulier
// $database_velden = array('from', 'subject') - alleen 'from', 'subject' velden
////// Redirect naar bedankt formulier na verzending
$redirect_url = 'http://www.volierevogels.nl/bedankt.html';
////// Auto-Responder
////// Verstuur een automatisch antwoord
////// %veld naam% in response tekst.
$autoresponder_enabled = 1;
$autoresponder_from = $send_to;
$autoresponder_subject = "%subject% (autoresponse)";
$autoresponder_message = <<<MSG
Hallo %name_from%,
Bedankt voor uw bericht. We nemen uw aanvraag zo gauw mogelijk in behandeling.
--
MSG;
/*************** Verander hieronder niets ! ***********************/
function do_formmail(){
global $autoresponder_enabled, $database_enabled;
$form = get_form_data();
$errors = check_form($form);
if ($errors) {
display_errors($errors);
return;
}
send_mail($form);
if ($autoresponder_enabled)
auto_respond($form);
if ($database_enabled)
save_form($form);
redirect();
}
function redirect(){
global $redirect_url;
header("Location: $redirect_url");
exit();
}
function save_form($vars){
global $database_file, $database_fields;
$f = fopen($database_file, 'a');
if (!$f){
die("Kan het db file niet openen om op te slaan");
}
foreach ($vars as $k=>$v) {
$vars[$k] = str_replace(array("|", "\r","\n"), array('_',' ',' '), $v);
}
if (is_array($database_fields)) {
$vars_orig = $vars;
$vars = array();
foreach ($database_fields as $k)
$vars[$k] = $vars_orig[$k];
}
$str = join('|', $vars);
fwrite($f, $str."\n");
fclose($f);
}
function auto_respond($vars){
global $autoresponder_from, $autoresponder_message, $autoresponder_subject;
$msg = $autoresponder_message;
preg_match_all('/%(.+?)%/', $msg, $out);
$s_vars = $out[1];
foreach ($s_vars as $k)
$msg = str_replace("%$k%", $vars[$k], $msg);
$subj = $autoresponder_subject;
preg_match_all('/%(.+?)%/', $subj, $out);
$s_vars = $out[1];
foreach ($s_vars as $k)
$subj = str_replace("%$k%", $vars[$k], $subj);
//
$_send_to = "$vars[name_from] <".$vars[email_from].">";
$_send_from = $autoresponder_from;
mail($_send_to, $subj, $msg, "From: $_send_from");
}
function _build_fields($vars){
$skip_fields = array(
'name_from',
'email_from',
'email_to',
'name_to',
'subject');
$is_ordered = 0;
foreach ($vars as $k=>$v)
if (in_array($k, $skip_fields)) unset($vars[$k]);
$new_vars = array();
foreach ($vars as $k=>$v){
$k = preg_replace('/_(req|num|reqnum)$/', '', $k);
if (preg_match('/^\d+[ \:_-]/', $k)) $is_ordered++;
$k = preg_replace('/^\d+[ \:_-]/', '', $k);
$new_vars[$k] = $v;
}
$vars = $new_vars;
$max_length = 10; // maximale lengte van key veld
foreach ($vars as $k=>$v) {
$klen = strlen($k);
if (($klen > $max_length) && ($klen < 40))
$max_length = $klen;
}
if ($is_ordered)
ksort($vars);
$out = "";
foreach ($vars as $k=>$v){
$k = str_replace('_', ' ', $k);
$k = ucfirst($k);
$len_diff = $max_length - strlen($k);
if ($len_diff > 0)
$fill = str_repeat('.', $len_diff);
else
$fill = '';
$out .= $k."$fill...: $v\n";
}
return $out;
}
function send_mail($vars){
global $send_to, $send_cc;
global $subject;
global $attachment_enabled;
global $REMOTE_ADDR;
global $HTTP_POST_FILES;
$files = array(); //files (veld namen) voor bijlage in email
if (count($HTTP_POST_FILES) && $attachment_enabled){
$files = array_keys($HTTP_POST_FILES);
}
// bouw email
$date_time = date('Y-m-d H:i:s');
$mime_delimiter = md5(time());
$fields = _build_fields($vars);
$mail = <<<EOF
Dit is een samenvatting boodschap
--$mime_delimiter
Content-type: text/plain
Content-Transfer-Encoding: 8bit
Het Mailformulier submitted:
$fields
--------------------
REMOTE IP : $REMOTE_ADDR
DATE/TIME : $date_time
EOF;
if (count($files)){
foreach ($files as $file){
$file_name = $HTTP_POST_FILES[$file]['name'];
$file_type = $HTTP_POST_FILES[$file]['type'];
$file_tmp_name = $HTTP_POST_FILES[$file]['tmp_name'];
$file_cnt = "";
$f=@fopen($file_tmp_name, "rb");
if (!$f)
continue;
while($f && !feof($f))
$file_cnt .= fread($f, 4096);
fclose($f);
if (!strlen($file_type)) $file_type="applicaton/octet-stream";
if ($file_type == 'application/x-msdownload')
$file_type = "applicaton/octet-stream";
$mail .= "\n--$mime_delimiter\n";
$mail .= "Content-type: $file_type\n";
$mail .= "Content-Disposition: attachment; filename=\"$file_name\"\n";
$mail .= "Content-Transfer-Encoding: base64\n\n";
$mail .= chunk_split(base64_encode($file_cnt));
}
}
$mail .= "\n--$mime_delimiter--";
//zenden naar
$_send_to = $send_to ? $send_to : "$vars[name_to] <".$vars[email_to].">";
$_send_from = "$vars[name_from] <".$vars[email_from].">";
$_subject = $subject ? $subject : $vars['subject'];
mail($_send_to, $_subject, $mail,
"Mime-Version: 1.0\r\nFrom: $_send_from\r\nContent-Type: multipart/mixed;\n boundary=\"$mime_delimiter\"\r\nContent-Disposition: inline");
foreach ($send_cc as $v){
mail($v, $_subject, $mail,
"Mime-Version: 1.0\r\nFrom: $_send_from\r\nContent-Type: multipart/mixed;\n boundary=\"$mime_delimiter\"\r\nContent-Disposition: inline");
}
}
function get_form_data(){
global $REQUEST_METHOD;
global $HTTP_POST_VARS;
global $HTTP_GET_VARS;
$vars = ($REQUEST_METHOD == 'GET') ? $HTTP_GET_VARS : $HTTP_POST_VARS;
//verwijder ruimte tussen alle velden
foreach ($vars as $k=>$v) $vars[$k] = trim($v);
return $vars;
}
function check_form($vars){
global $referrers;
global $send_to;
global $subject;
global $HTTP_REFERER;
$errors = array();
if (!strlen($vars['email_from'])){
$errors[] = "<b>Van Email adres</b> leeg";
} else if (!check_email($vars['email_from'])){
$errors[] = "<b>Van Email adres</b> onjuist";
}
if (!strlen($send_to) && !strlen($vars['email_to'])){
$errors[] = "<b>Naar Email</b> adres leeg (waarschijnlijk configuratie fout)";
} else if (!strlen($send_to) && !check_email($vars['email_to'])){
$errors[] = "<b>Naar Email adres</b> onjuist";
}
if (!strlen($vars['subject']) && !strlen($subject)){
$errors[] = "<b>Onderwerp</b> leeg (waarschijnlijk configuratie fout)";
}
foreach ($vars as $k=>$v){
if (preg_match('/^(.+?)_req$/i', $k, $m) && !strlen($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Verplicht veld <b>$field_name</b> leeg";
}
if (preg_match('/^(.+?)_num$/i', $k, $m) && strlen($v) && !is_numeric($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Veld <b>$field_name</b> moet getal of cijfers bevatten of laat leeg";
}
if (preg_match('/^(.+?)_reqnum$/i', $k, $m) && !is_numeric($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Veld <b>$field_name</b> moet getal of cijvers bevatten of laat leeg";
}
}
//controleer gebruiker
if (is_array($referrers) && count($referrers)){
$ref = parse_url($HTTP_REFERER);
$host = $ref['host'];
$host_found = 0;
foreach ($referrers as $r){
if (strstr($host, $r))
$host_found++;
}
if (!$host_found){
$errors[] = "Onbekende gebruiker: <b>$host</b>";
}
}
return $errors;
}
function display_errors($errors){
$errors = '<li>' . join('<li>', $errors);
print <<<EOF
<head>
<title>Mailformulier fout melding</title>
</head>
<body bgcolor=white>
<h3 align=center><font color=red>Een fout is opgetreden</font></h3>
<hr width=80%>
<table align=center><tr><td>
$errors
</td></tr></table>
<p align=center>
<a href="javascript: history.back(-1)">Ga terug</a> en verander de fout melding
</p>
<hr width=80%>
</body>
</html>
EOF;
}
function check_email($email) {
if (!preg_match('/^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$/', $email))
return false;
if ( preg_match('/^[^0-9a-zA-Z]|[^0-9a-zA-Z]$/', $email))
return false;
if (!preg_match('/([0-9a-zA-Z_]{1})\@./',$email) )
return false;
if (!preg_match('/.\@([0-9a-zA-Z_]{1})/',$email) )
return false;
if ( preg_match('/.\.\-.|.\-\..|.\.\..|.\-\-./',$email) )
return false;
if ( preg_match('/.\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_./',$email) )
return false;
if (!preg_match('/\.([a-zA-Z]{2,5})$/',$email) )
return false;
return true;
}
do_formmail();
?>
/*****************************************************************************
* *
* C O N F I G U R A T I O N *
* *
*****************************************************************************/
// email adres waar naar toe moet worden gezonden //////////////////////////////
// als leeg, dan wordt veld from gebruikt ('send_to' veld)
$send_to = "Webmaster www.volierevogels.nl <[email protected]>";
// set $send_cc adres als je een copy wilt ontvangen of mail naar ander adressen
// als voorbeeld: $send_cc = array('[email protected]', '[email protected]');
// of laat het leeg
$send_cc = array();
// Onderwerp. als leeg, gebruikt veld from ('subject' veld)
$subject = "Koopje";
// Toestaan Referres. laat leeg of maak lijst met domeinnamen
$referrers = array('');
// Bijlage
$attachment_enabled = 1;
////// Database - maak CSV file met data van verzonden formulieren /////////////
$database_enabled = 0;
$database_file = 'email.csv';
// Verzamel velden voor in database
// $database_velden = '*' - betekend alle velden, als in formulier
// $database_velden = array('from', 'subject') - alleen 'from', 'subject' velden
////// Redirect naar bedankt formulier na verzending
$redirect_url = 'http://www.volierevogels.nl/bedankt.html';
////// Auto-Responder
////// Verstuur een automatisch antwoord
////// %veld naam% in response tekst.
$autoresponder_enabled = 1;
$autoresponder_from = $send_to;
$autoresponder_subject = "%subject% (autoresponse)";
$autoresponder_message = <<<MSG
Hallo %name_from%,
Bedankt voor uw bericht. We nemen uw aanvraag zo gauw mogelijk in behandeling.
--
MSG;
/*************** Verander hieronder niets ! ***********************/
function do_formmail(){
global $autoresponder_enabled, $database_enabled;
$form = get_form_data();
$errors = check_form($form);
if ($errors) {
display_errors($errors);
return;
}
send_mail($form);
if ($autoresponder_enabled)
auto_respond($form);
if ($database_enabled)
save_form($form);
redirect();
}
function redirect(){
global $redirect_url;
header("Location: $redirect_url");
exit();
}
function save_form($vars){
global $database_file, $database_fields;
$f = fopen($database_file, 'a');
if (!$f){
die("Kan het db file niet openen om op te slaan");
}
foreach ($vars as $k=>$v) {
$vars[$k] = str_replace(array("|", "\r","\n"), array('_',' ',' '), $v);
}
if (is_array($database_fields)) {
$vars_orig = $vars;
$vars = array();
foreach ($database_fields as $k)
$vars[$k] = $vars_orig[$k];
}
$str = join('|', $vars);
fwrite($f, $str."\n");
fclose($f);
}
function auto_respond($vars){
global $autoresponder_from, $autoresponder_message, $autoresponder_subject;
$msg = $autoresponder_message;
preg_match_all('/%(.+?)%/', $msg, $out);
$s_vars = $out[1];
foreach ($s_vars as $k)
$msg = str_replace("%$k%", $vars[$k], $msg);
$subj = $autoresponder_subject;
preg_match_all('/%(.+?)%/', $subj, $out);
$s_vars = $out[1];
foreach ($s_vars as $k)
$subj = str_replace("%$k%", $vars[$k], $subj);
//
$_send_to = "$vars[name_from] <".$vars[email_from].">";
$_send_from = $autoresponder_from;
mail($_send_to, $subj, $msg, "From: $_send_from");
}
function _build_fields($vars){
$skip_fields = array(
'name_from',
'email_from',
'email_to',
'name_to',
'subject');
$is_ordered = 0;
foreach ($vars as $k=>$v)
if (in_array($k, $skip_fields)) unset($vars[$k]);
$new_vars = array();
foreach ($vars as $k=>$v){
$k = preg_replace('/_(req|num|reqnum)$/', '', $k);
if (preg_match('/^\d+[ \:_-]/', $k)) $is_ordered++;
$k = preg_replace('/^\d+[ \:_-]/', '', $k);
$new_vars[$k] = $v;
}
$vars = $new_vars;
$max_length = 10; // maximale lengte van key veld
foreach ($vars as $k=>$v) {
$klen = strlen($k);
if (($klen > $max_length) && ($klen < 40))
$max_length = $klen;
}
if ($is_ordered)
ksort($vars);
$out = "";
foreach ($vars as $k=>$v){
$k = str_replace('_', ' ', $k);
$k = ucfirst($k);
$len_diff = $max_length - strlen($k);
if ($len_diff > 0)
$fill = str_repeat('.', $len_diff);
else
$fill = '';
$out .= $k."$fill...: $v\n";
}
return $out;
}
function send_mail($vars){
global $send_to, $send_cc;
global $subject;
global $attachment_enabled;
global $REMOTE_ADDR;
global $HTTP_POST_FILES;
$files = array(); //files (veld namen) voor bijlage in email
if (count($HTTP_POST_FILES) && $attachment_enabled){
$files = array_keys($HTTP_POST_FILES);
}
// bouw email
$date_time = date('Y-m-d H:i:s');
$mime_delimiter = md5(time());
$fields = _build_fields($vars);
$mail = <<<EOF
Dit is een samenvatting boodschap
--$mime_delimiter
Content-type: text/plain
Content-Transfer-Encoding: 8bit
Het Mailformulier submitted:
$fields
--------------------
REMOTE IP : $REMOTE_ADDR
DATE/TIME : $date_time
EOF;
if (count($files)){
foreach ($files as $file){
$file_name = $HTTP_POST_FILES[$file]['name'];
$file_type = $HTTP_POST_FILES[$file]['type'];
$file_tmp_name = $HTTP_POST_FILES[$file]['tmp_name'];
$file_cnt = "";
$f=@fopen($file_tmp_name, "rb");
if (!$f)
continue;
while($f && !feof($f))
$file_cnt .= fread($f, 4096);
fclose($f);
if (!strlen($file_type)) $file_type="applicaton/octet-stream";
if ($file_type == 'application/x-msdownload')
$file_type = "applicaton/octet-stream";
$mail .= "\n--$mime_delimiter\n";
$mail .= "Content-type: $file_type\n";
$mail .= "Content-Disposition: attachment; filename=\"$file_name\"\n";
$mail .= "Content-Transfer-Encoding: base64\n\n";
$mail .= chunk_split(base64_encode($file_cnt));
}
}
$mail .= "\n--$mime_delimiter--";
//zenden naar
$_send_to = $send_to ? $send_to : "$vars[name_to] <".$vars[email_to].">";
$_send_from = "$vars[name_from] <".$vars[email_from].">";
$_subject = $subject ? $subject : $vars['subject'];
mail($_send_to, $_subject, $mail,
"Mime-Version: 1.0\r\nFrom: $_send_from\r\nContent-Type: multipart/mixed;\n boundary=\"$mime_delimiter\"\r\nContent-Disposition: inline");
foreach ($send_cc as $v){
mail($v, $_subject, $mail,
"Mime-Version: 1.0\r\nFrom: $_send_from\r\nContent-Type: multipart/mixed;\n boundary=\"$mime_delimiter\"\r\nContent-Disposition: inline");
}
}
function get_form_data(){
global $REQUEST_METHOD;
global $HTTP_POST_VARS;
global $HTTP_GET_VARS;
$vars = ($REQUEST_METHOD == 'GET') ? $HTTP_GET_VARS : $HTTP_POST_VARS;
//verwijder ruimte tussen alle velden
foreach ($vars as $k=>$v) $vars[$k] = trim($v);
return $vars;
}
function check_form($vars){
global $referrers;
global $send_to;
global $subject;
global $HTTP_REFERER;
$errors = array();
if (!strlen($vars['email_from'])){
$errors[] = "<b>Van Email adres</b> leeg";
} else if (!check_email($vars['email_from'])){
$errors[] = "<b>Van Email adres</b> onjuist";
}
if (!strlen($send_to) && !strlen($vars['email_to'])){
$errors[] = "<b>Naar Email</b> adres leeg (waarschijnlijk configuratie fout)";
} else if (!strlen($send_to) && !check_email($vars['email_to'])){
$errors[] = "<b>Naar Email adres</b> onjuist";
}
if (!strlen($vars['subject']) && !strlen($subject)){
$errors[] = "<b>Onderwerp</b> leeg (waarschijnlijk configuratie fout)";
}
foreach ($vars as $k=>$v){
if (preg_match('/^(.+?)_req$/i', $k, $m) && !strlen($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Verplicht veld <b>$field_name</b> leeg";
}
if (preg_match('/^(.+?)_num$/i', $k, $m) && strlen($v) && !is_numeric($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Veld <b>$field_name</b> moet getal of cijfers bevatten of laat leeg";
}
if (preg_match('/^(.+?)_reqnum$/i', $k, $m) && !is_numeric($v)){
$field_name = ucfirst($m[1]);
$errors[] = "Veld <b>$field_name</b> moet getal of cijvers bevatten of laat leeg";
}
}
//controleer gebruiker
if (is_array($referrers) && count($referrers)){
$ref = parse_url($HTTP_REFERER);
$host = $ref['host'];
$host_found = 0;
foreach ($referrers as $r){
if (strstr($host, $r))
$host_found++;
}
if (!$host_found){
$errors[] = "Onbekende gebruiker: <b>$host</b>";
}
}
return $errors;
}
function display_errors($errors){
$errors = '<li>' . join('<li>', $errors);
print <<<EOF
<head>
<title>Mailformulier fout melding</title>
</head>
<body bgcolor=white>
<h3 align=center><font color=red>Een fout is opgetreden</font></h3>
<hr width=80%>
<table align=center><tr><td>
$errors
</td></tr></table>
<p align=center>
<a href="javascript: history.back(-1)">Ga terug</a> en verander de fout melding
</p>
<hr width=80%>
</body>
</html>
EOF;
}
function check_email($email) {
if (!preg_match('/^[0-9a-zA-Z\.\-\_]+\@[0-9a-zA-Z\.\-]+$/', $email))
return false;
if ( preg_match('/^[^0-9a-zA-Z]|[^0-9a-zA-Z]$/', $email))
return false;
if (!preg_match('/([0-9a-zA-Z_]{1})\@./',$email) )
return false;
if (!preg_match('/.\@([0-9a-zA-Z_]{1})/',$email) )
return false;
if ( preg_match('/.\.\-.|.\-\..|.\.\..|.\-\-./',$email) )
return false;
if ( preg_match('/.\.\_.|.\-\_.|.\_\..|.\_\-.|.\_\_./',$email) )
return false;
if (!preg_match('/\.([a-zA-Z]{2,5})$/',$email) )
return false;
return true;
}
do_formmail();
?>
Weet niemand een oplossing?
Pff met dit warme weer ff 200 regels doorlopen ^o)
Ik denk zelf dat er wat fout zit in de refferers. Maar weet het niet zeker.....
ik verwacht dat je het hiermee wel kan oplossen:
$referrers = $_REQUEST['referrers'];
zet die gewoon ergens bovenaan in het script :)