bledileka / emailcleaningclub-api
一个用于使用 EmailCleaning.Club API 服务的示例 PHP 接口。
dev-main
2021-11-21 14:14 UTC
Requires
- php: ^7.0
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2024-09-24 04:40:51 UTC
README
emailcleaningclub-api
简单的 cURL REST API 调用 EmailCleaning.club 端点。此脚本将进行电子邮件验证请求。
请确保在 API 密钥设置中将您的服务器 IP 地址列入白名单。如果不这样做,您将无法获得任何结果。
安装
通过 composer
composer require emailcleaningclub/cleanlist-php-api
示例调用
<?php /* * Sample call - Make sure to whitelist your servers ip address on your account in order to have proper responses */ require 'vendor/autoload.php'; use emailcleaningclub\Verification\Verification; /* initialize the class with main configs */ $Start = new Verification("90C5626330E03D5C1799DF270AF7A114528B6F40"); /* sample call to check/verify an email address */ $payload = [ "check" => "basic", // basic|advanced - if not provided "basic" check type is used. "email" => "john@smith.com" // email address ]; $results = $Start->_call($payload); print_r($results); ?>
示例 http cURL 调用
curl "https://api.emailcleaning.club/api/v1/?api_key={your_api_key}&email={email_address}&check={basic|advanced}"
响应
Array
(
[code] => 401
[message] => Unauthorized Access!
)
Invalid API key OR ip addess not whitelisted.
Array
(
[code] => 200
[status] => role
[risklevel] => risky
[message] => Role Based Email - Role based emails reflect different departments/roles, like: admin@ or sales@. These emails are not bad emails or to avoid, just make sure to be cautious.
[verification_type] => advanced
[verification_cost] => 2
)
Risklevel can be: safe|risky|bad
Status reflects the verification code. In most cases it is a logical word reflecting the result.
常见状态码