mirror of
				https://github.com/disposable-email-domains/disposable-email-domains.git
				synced 2025-05-29 01:49:27 +08:00 
			
		
		
		
	Simplified PHP code
This commit is contained in:
		
							parent
							
								
									768d787703
								
							
						
					
					
						commit
						e82e634b18
					
				@ -24,8 +24,7 @@ else:
 | 
				
			|||||||
PHP contributed by @txt3rob
 | 
					PHP contributed by @txt3rob
 | 
				
			||||||
```php
 | 
					```php
 | 
				
			||||||
function is_temp_mail($mail) {
 | 
					function is_temp_mail($mail) {
 | 
				
			||||||
    $list = file_get_contents ('disposable_email_blacklist.conf');
 | 
					    $mail_domains_ko = file('disposable_email_blacklist.conf', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
 | 
				
			||||||
    $mail_domains_ko = explode("\n", $list);
 | 
					 | 
				
			||||||
    foreach($mail_domains_ko as $ko_mail) {
 | 
					    foreach($mail_domains_ko as $ko_mail) {
 | 
				
			||||||
        list($mail_address, $mail_domain) = explode('@',$mail);
 | 
					        list($mail_address, $mail_domain) = explode('@',$mail);
 | 
				
			||||||
        if(strcasecmp($mail_domain, $ko_mail) == 0){
 | 
					        if(strcasecmp($mail_domain, $ko_mail) == 0){
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user