Fidro + PHP Integration
Integrate Fidro into any PHP application. Follow this guide to add email validation and IP intelligence in minutes.
Overview
To integrate Fidro with PHP, use Guzzle to send a POST request to the Fidro API with the user's email and IP address. Fidro returns email validation results, disposable domain detection, IP intelligence, and a fraud risk score in a single JSON response. No proprietary SDK is required — Guzzle or any PHP HTTP client handles the integration seamlessly.
Fidro is a fraud detection API that combines email validation, IP intelligence, geolocation analysis, and Stripe chargeback prevention in a single API call. It returns a risk score with a clear recommendation — allow, review, or block — so you can stop fraud without building your own scoring logic.
1. Install Dependencies
composer require guzzlehttp/guzzle
You will also need a Fidro API key. Sign up for free to get one.
2. Email Validation
Send a POST request to Fidro's /v1/validate endpoint with the user's email address and optional IP. Fidro validates the email, checks for disposable domains, analyzes the IP for VPN/proxy/Tor usage, and returns a risk score with a clear recommendation — allow, review, or block.
<?php
require_once 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$apiKey = getenv('FIDRO_API_KEY');
$client = new Client();
try {
$response = $client->post('https://api.fidro.io/v1/validate', [
'headers' => [
'Authorization' => 'Bearer ' . $apiKey,
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'test@example.com',
'ip' => '8.8.8.8',
],
]);
$result = json_decode($response->getBody(), true);
echo 'Risk score: ' . $result['data']['risk_score'] . PHP_EOL;
echo 'Recommendation: ' . $result['data']['recommendation'] . PHP_EOL;
} catch (RequestException $e) {
echo 'Error: ' . $e->getMessage() . PHP_EOL;
}
3. IP Lookup
Send a POST request to Fidro's /v1/ip-lookup endpoint with an IP address. Fidro returns geolocation data (country, city, ISP), VPN and proxy detection, Tor exit node identification, and threat intelligence — all in a single API call.
<?php
require_once 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$apiKey = getenv('FIDRO_API_KEY');
$client = new Client();
try {
$response = $client->post('https://api.fidro.io/v1/ip-lookup', [
'headers' => [
'Authorization' => 'Bearer ' . $apiKey,
'Content-Type' => 'application/json',
],
'json' => [
'ip' => '8.8.8.8',
],
]);
$result = json_decode($response->getBody(), true);
echo 'Country: ' . $result['data']['country'] . PHP_EOL;
echo 'Is VPN: ' . ($result['data']['is_vpn'] ? 'true' : 'false') . PHP_EOL;
} catch (RequestException $e) {
echo 'Error: ' . $e->getMessage() . PHP_EOL;
}
Next steps
Explore the full API reference, try the free email checker, or see how Fidro compares to other solutions.
Frequently Asked Questions
How do I add fraud detection to PHP?
Does Fidro have a PHP SDK?
Is Fidro free to use with PHP?
Start catching bad signups in the next 5 minutes
Create your account, grab your API key, and send your first request. Free plan with 200 validations/month. No credit card. Cancel anytime.
Get Started Free