mirror of
https://github.com/disposable-email-domains/disposable-email-domains.git
synced 2025-05-29 01:49:27 +08:00
add Python example
This commit is contained in:
parent
aec331bf3b
commit
7c42b402e2
10
README.md
10
README.md
@ -7,6 +7,16 @@ Originally collected to filter new user registration at https://usegalaxy.org an
|
|||||||
|
|
||||||
Example Usage
|
Example Usage
|
||||||
=============
|
=============
|
||||||
|
Python
|
||||||
|
```Python
|
||||||
|
blacklist = ('disposable_email_blacklist.conf')
|
||||||
|
blacklist_content = [line.rstrip() for line in blacklist.readlines()]
|
||||||
|
if email.split('@')[1] in blacklist_content:
|
||||||
|
message = "Please enter your permanent email address."
|
||||||
|
return (False, message)
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
```
|
||||||
PHP
|
PHP
|
||||||
```php
|
```php
|
||||||
function is_temp_mail($mail) {
|
function is_temp_mail($mail) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user