经测试,感觉这个网站只能验证是否合法,但并不能测试是否存在
PHP代码示例
API``email/email@example.com
GET https://www.validator.pizza/email/email@example.com
<?php
$email = "email@example.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.validator.pizza/email/' . $email);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
回应
回应(JSON)
// Valid email
{
"status": 200,
"email": "email@example.com",
"domain": "example.com",
"mx": false,
"disposable": false,
"alias": false,
"did_you_mean": false,
"remaining_requests": 119
}
// Invalid email
{
"status": 400,
"error": "The email address is invalid."
}
// Requests limit reached
{
"status": 429,
"error": "Rate limit exceeded."
}
验证域名是否有效。方式同上,只是api
改成了domain/example.com
GET https://www.validator.pizza/domain/example.com
回应(JSON)
// Valid domain
{
"status": 200,
"domain": "example.com",
"mx": false,
"disposable": false,
"did_you_mean": false,
"remaining_requests": 119
}
// Invalid domain
{
"status": 400,
"error": "The domain is invalid."
}
// Requests limit reached
{
"status": 429,
"error": "Rate limit exceeded."
}