email-verifier/verifier-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

email-verifier/verifier-php

Composer 安装命令:

composer require email-verifier/verifier-php

包简介

VerifyRight Email Verification Library for PHP

README 文档

README

A PHP library for validating emails using the VerifyRight API. Checks for non-existent emails, invalid domains, and disposable email addresses.

Installation

Install via Composer:

composer require email-verifier/verifier-php

Usage

Basic usage:

use EmailVerifier\EmailVerifier;

// Initialize with your API token
$verifier = new EmailVerifier('YOUR_ACCESS_TOKEN');

// Simple verification (returns true/false)
try {
    $isValid = $verifier->verifyEmail('test@example.com');
} catch (InvalidArgumentException $e) {
    // Handle invalid email format
    echo "Invalid email format: " . $e->getMessage();
} catch (RuntimeException $e) {
    // Handle API errors
    echo "API error: " . $e->getMessage();
}

// Get detailed verification results
try {
    $details = $verifier->verifyEmail('test@example.com', true);
    /*
    Returns array with:
    {
        "status": "valid",
        "domain": "example.com",
        "is_disposable": false,
        "is_role_account": false
    }
    */
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

Features

  • Email format validation
  • Domain existence check
  • Disposable email detection
  • Role account detection
  • Detailed verification results
  • Modern PHP 7.4+ support
  • Exception handling
  • PSR-4 autoloading

Requirements

  • PHP 7.4 or higher
  • curl extension
  • json extension

License

MIT License

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-12