How to block Disposable Email Addresses in your website's registration form?

后端 未结 11 2198
天命终不由人
天命终不由人 2020-11-29 23:55

I would like to know of the possible ways to block disposable email addresses from registering in my website.

For simplicity, let\'s take the example where the regi

11条回答
  •  野性不改
    2020-11-30 00:50

    There's this disposable email address detector web service http://www.nameapi.org/en/live-demos/disposable-email-address-detector/ (disclaimer: I work for them). It offers 10'000 free requests monthly. With the PHP client library https://github.com/optimaize/nameapi-client-php your userland code looks something like this:

    $deaDetector = $serviceFactory->emailServices()->disposableEmailAddressDetector();
    $result = $deaDetector->isDisposable("abcdefgh@10minutemail.com");
    echo $result->getDisposable()->toString()); //will print 'YES'
    

提交回复
热议问题