Native PHP cURL Email Verification Guide
Add real-time email verification and disposable-email blocking to Native PHP cURL with the VeriShield Edge API. The snippet below gates a signup and returns the canonical email identity.
Language
PHP 8.3
Ecosystem
Core PHP
Latency
< 85ms
Install
Shell
composer install (no deps)Verification code
PHP 8.3
function verishield_verify(string $email): array {
$ch = curl_init('https://verishield-edge-api.p.rapidapi.com/v1/verify');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-RapidAPI-Key: ' . getenv('RAPIDAPI_KEY')
],
CURLOPT_POSTFIELDS => json_encode(['email' => $email]),
CURLOPT_TIMEOUT => 3
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
return $data;
}What this protects against
Disposable and temporary inboxes, Gmail dot-trick and plus-alias multi-accounting, high-entropy bot usernames, and freshly registered fraud domains. The API returns a 0-100 fraud score with an ALLOW, CHALLENGE_2FA or BLOCK recommendation.