1
1
<?php
2
- # This program is distributed under the terms and conditions of the LGPL
3
- # See the README and LICENSE files for details
4
-
5
- /**
6
- * Disposable Email Checker - a static php based check for spam emails
7
- * @copyright Copyright (C) 2007-2008 Victor Boctor
8
- * @link http://www.mantisbt.org/
9
- * @link http://www.futureware.biz/disposable
10
- * @version 1.1.0-git - Release Date: 13-Apr-2008
11
- * @package DisposableEmail
12
- */
2
+ # Disposable Email Checker - a static php based check for spam emails
3
+ # Copyright (C) 2007-2008 Victor Boctor
4
+
5
+ # This program is distributed under the terms and conditions of the LGPL
6
+ # See the README and LICENSE files for details
13
7
14
8
/**
15
9
* A class that checks an email address and provides some facts about whether
16
10
* it is a disposable, free web mail, etc. The data that is used to make
17
11
* such decision is static as part of the class implementation, hence
18
12
* avoiding a round trip to a remote service. This makes the class much
19
13
* more efficient in scenarios where performance is an issue.
20
- * @package DisposableEmail
21
14
*/
22
15
class DisposableEmailChecker
23
16
{
@@ -69,20 +62,27 @@ class DisposableEmailChecker
69
62
'75hosting.net ' ,
70
63
'75hosting.org ' ,
71
64
'ajaxapp.net ' ,
65
+ 'amilegit.com ' ,
72
66
'amiri.net ' ,
73
67
'amiriindustries.com ' ,
74
68
'anonymail.dk ' ,
75
- 'bugmenot .com ' ,
69
+ 'anonymbox .com ' ,
76
70
'bspamfree.org ' ,
71
+ 'bugmenot.com ' ,
77
72
'buyusedlibrarybooks.org ' ,
73
+ 'deadaddress.com ' ,
78
74
'discardmail.com ' ,
75
+ 'disposeamail.com ' ,
76
+ 'dispostable.com ' ,
79
77
'dodgeit.com ' ,
80
78
'dontsendmespam.de ' ,
81
79
'emaildienst.de ' ,
82
80
'emailmiser.com ' ,
81
+ 'emailthe.net ' ,
83
82
'etranquil.com ' ,
84
83
'etranquil.net ' ,
85
84
'etranquil.org ' ,
85
+ 'fakeinbox.com ' ,
86
86
'fastacura.com ' ,
87
87
'fastchevy.com ' ,
88
88
'fastchrysler.com ' ,
@@ -106,54 +106,70 @@ class DisposableEmailChecker
106
106
'gowikitv.com ' ,
107
107
'haltospam.com ' ,
108
108
'ichimail.com ' ,
109
+ 'incognitomail.org ' ,
109
110
'ipoo.org ' ,
110
111
'killmail.net ' ,
111
112
'klassmaster.com ' ,
112
113
'link2mail.net ' ,
113
114
'lortemail.dk ' ,
115
+ 'mailcatch.com ' ,
114
116
'maileater.com ' ,
115
117
'mailin8r.com ' ,
116
118
'mailinator.com ' ,
117
119
'mailinator.net ' ,
118
120
'mailinator2.com ' ,
121
+ 'mailmetrash.com ' ,
122
+ 'mailnesia.com ' ,
119
123
'mailquack.com ' ,
120
124
'mailslapping.com ' ,
125
+ 'meltmail.com ' ,
126
+ 'mmmmail.com ' ,
127
+ 'mt2009.com ' ,
121
128
'myspaceinc.com ' ,
122
129
'myspaceinc.net ' ,
123
130
'myspaceinc.org ' ,
124
131
'myspacepimpedup.com ' ,
125
132
'mytrashmail.com ' ,
133
+ 'nepwk.com ' ,
126
134
'no-spam.hu ' ,
127
135
'nobulk.com ' ,
128
136
'noclickemail.com ' ,
129
137
'nospamfor.us ' ,
138
+ 'nowmymail.com ' ,
130
139
'oneoffemail.com ' ,
131
140
'oneoffmail.com ' ,
132
141
'oopi.org ' ,
133
142
'ourklips.com ' ,
134
143
'pimpedupmyspace.com ' ,
135
144
'pookmail.com ' ,
136
- 'rejectmail.com ' ,
137
145
'recyclemail.dk ' ,
146
+ 'rejectmail.com ' ,
138
147
'rklips.com ' ,
148
+ 'sharklasers.com ' ,
139
149
'shortmail.net ' ,
140
150
'sofort-mail.de ' ,
141
151
'sogetthis.com ' ,
142
152
'spam.la ' ,
143
153
'spamavert.com ' ,
144
154
'spambob.com ' ,
145
155
'spambog.com ' ,
156
+ 'spambox.us ' ,
146
157
'spamfree24.com ' ,
147
158
'spamfree24.net ' ,
148
159
'spamfree24.org ' ,
149
160
'spaml.com ' ,
150
161
'tempemail.net ' ,
151
162
'tempinbox.com ' ,
163
+ 'tempomail.fr ' ,
152
164
'temporaryinbox.com ' ,
165
+ 'thankyou2010.com ' ,
166
+ 'thisisnotmyrealemail.com ' ,
153
167
'trash-mail.de ' ,
168
+ 'trash2009.com ' ,
154
169
'trashdevil.com ' ,
155
170
'trashdevil.de ' ,
156
171
'trashmail.net ' ,
172
+ 'trashymail.com ' ,
157
173
'turual.com ' ,
158
174
'twinmail.de ' ,
159
175
'upliftnow.com ' ,
@@ -165,8 +181,9 @@ class DisposableEmailChecker
165
181
'wetrainbayarea.com ' ,
166
182
'wetrainbayarea.org ' ,
167
183
'whopy.com ' ,
168
- 'willselfdestruct.com ' ,
184
+ 'whyspam.me ' ,
169
185
'wilemail.com ' ,
186
+ 'willselfdestruct.com ' ,
170
187
'xagloo.com ' ,
171
188
'yopmail.com '
172
189
);
@@ -266,6 +283,7 @@ class DisposableEmailChecker
266
283
'pancakemail.com ' ,
267
284
'ravemail.co.za ' ,
268
285
'rediffmail.com ' ,
286
+ 'sapo.pt ' ,
269
287
'starmail.co.za ' ,
270
288
'talk21.com ' ,
271
289
'thecricket.co.za ' ,
@@ -311,7 +329,7 @@ class DisposableEmailChecker
311
329
* @param $p_email The email address to validate.
312
330
* @returns true: disposable, false: non-disposable.
313
331
*/
314
- public static function is_disposable_email ( $ p_email ) {
332
+ function is_disposable_email ( $ p_email ) {
315
333
return (
316
334
DisposableEmailChecker::is_forwarding_email ( $ p_email ) ||
317
335
DisposableEmailChecker::is_trash_email ( $ p_email ) ||
@@ -321,42 +339,42 @@ public static function is_disposable_email( $p_email ) {
321
339
322
340
/**
323
341
* Determines if the email address is disposable email that forwards to
324
- * users' email address. This is one of the best kind of disposable
342
+ * users' email address. This is one of the best kind of disposable
325
343
* addresses since emails end up in the user's inbox unless the user
326
344
* cancel the address.
327
345
*
328
346
* @param $p_email The email address to check.
329
347
* @returns true: disposable forwarding, false: otherwise.
330
348
*/
331
- public static function is_forwarding_email ( $ p_email ) {
349
+ function is_forwarding_email ( $ p_email ) {
332
350
$ t_domain = DisposableEmailChecker::_get_domain_from_address ( $ p_email );
333
351
return in_array ( $ t_domain , DisposableEmailChecker::$ forwarding_domains_array );
334
352
}
335
353
336
354
/**
337
355
* Determines if the email address is trash email that doesn't forward to
338
- * user's email address. This kind of address can be checked using a
356
+ * user's email address. This kind of address can be checked using a
339
357
* web page and no password is required for such check. Hence, data sent
340
358
* to such address is not protected. Typically users use these addresses
341
359
* to signup for a service, and then they never check it again.
342
360
*
343
361
* @param $p_email The email address to check.
344
362
* @returns true: disposable trash mail, false: otherwise.
345
363
*/
346
- public static function is_trash_email ( $ p_email ) {
364
+ function is_trash_email ( $ p_email ) {
347
365
$ t_domain = DisposableEmailChecker::_get_domain_from_address ( $ p_email );
348
366
return in_array ( $ t_domain , DisposableEmailChecker::$ trash_domains_array );
349
367
}
350
368
351
369
/**
352
370
* Determines if the email address is a shredder email address. Shredder
353
- * email address delete all received emails without forwarding them or
371
+ * email address delete all received emails without forwarding them or
354
372
* making them available for a user to check.
355
373
*
356
374
* @param $p_email The email address to check.
357
375
* @returns true: shredded disposable email, false: otherwise.
358
376
*/
359
- public static function is_shredder_email ( $ p_email ) {
377
+ function is_shredder_email ( $ p_email ) {
360
378
$ t_domain = DisposableEmailChecker::_get_domain_from_address ( $ p_email );
361
379
return in_array ( $ t_domain , DisposableEmailChecker::$ shredder_domains_array );
362
380
}
@@ -370,10 +388,10 @@ public static function is_shredder_email( $p_email ) {
370
388
* @param $p_email The email address to check.
371
389
* @returns true: time bound disposable email, false: otherwise.
372
390
*/
373
- public static function is_time_bound_email ( $ p_email ) {
391
+ function is_time_bound_email ( $ p_email ) {
374
392
$ t_domain = DisposableEmailChecker::_get_domain_from_address ( $ p_email );
375
393
return in_array ( $ t_domain , DisposableEmailChecker::$ time_bound_domains_array );
376
- }
394
+ }
377
395
378
396
/**
379
397
* See is_open_domain() for details.
@@ -397,26 +415,26 @@ function is_free_email( $p_email ) {
397
415
* @param $p_email The email address to check.
398
416
* @returns true: open domain email, false: otherwise.
399
417
*/
400
- public static function is_open_email ( $ p_email ) {
418
+ function is_open_email ( $ p_email ) {
401
419
$ t_domain = DisposableEmailChecker::_get_domain_from_address ( $ p_email );
402
420
return in_array ( $ t_domain , DisposableEmailChecker::$ open_domains_array );
403
421
}
404
422
405
423
/**
406
424
* A debugging function that takes in an email address and dumps out the
407
425
* details for such email.
408
- *
409
- * @param $p_email The email address to echo results for. This must be a
426
+ *
427
+ * @param $p_email The email address to echo results for. This must be a
410
428
* safe script (i.e. no javascript, etc).
411
429
*/
412
430
function echo_results ( $ p_email ) {
413
431
echo 'email address = ' , htmlspecialchars ( $ p_email ), '<br /> ' ;
414
- echo 'is_disposable_email = ' , DisposableEmailChecker::is_disposable_email ( $ p_email ), '<br /> ' ;
415
- echo 'is_forwarding_email = ' , DisposableEmailChecker::is_forwarding_email ( $ p_email ), '<br /> ' ;
416
- echo 'is_trash_email = ' , DisposableEmailChecker::is_trash_email ( $ p_email ), '<br /> ' ;
417
- echo 'is_time_bound_email = ' , DisposableEmailChecker::is_time_bound_email ( $ p_email ), '<br /> ' ;
418
- echo 'is_shredder_email = ' , DisposableEmailChecker::is_shredder_email ( $ p_email ), '<br /> ' ;
419
- echo 'is_free_email = ' , DisposableEmailChecker::is_free_email ( $ p_email ), '<br /> ' ;
432
+ echo 'is_disposable_email = ' , DisposableEmailChecker::is_disposable_email ( $ p_email ), '<br /> ' ;
433
+ echo 'is_forwarding_email = ' , DisposableEmailChecker::is_forwarding_email ( $ p_email ), '<br /> ' ;
434
+ echo 'is_trash_email = ' , DisposableEmailChecker::is_trash_email ( $ p_email ), '<br /> ' ;
435
+ echo 'is_time_bound_email = ' , DisposableEmailChecker::is_time_bound_email ( $ p_email ), '<br /> ' ;
436
+ echo 'is_shredder_email = ' , DisposableEmailChecker::is_shredder_email ( $ p_email ), '<br /> ' ;
437
+ echo 'is_free_email = ' , DisposableEmailChecker::is_free_email ( $ p_email ), '<br /> ' ;
420
438
}
421
439
422
440
/**
@@ -442,12 +460,12 @@ function echo_stats() {
442
460
* @param $p_email The email address to extra the domain from.
443
461
* @returns The lower case domain or empty string if email not valid.
444
462
*/
445
- private static function _get_domain_from_address ( $ p_email ) {
463
+ function _get_domain_from_address ( $ p_email ) {
446
464
$ t_domain_pos = strpos ( $ p_email , '@ ' );
447
465
if ( $ t_domain_pos === false ) {
448
466
return '' ;
449
467
}
450
468
451
469
return strtolower ( substr ( $ p_email , $ t_domain_pos + 1 ) );
452
470
}
453
- }
471
+ }
0 commit comments