All Integrations

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?
You can add fraud detection to PHP by calling Fidro's REST API with a POST request containing the user's email and IP address. Fidro returns a risk score and a clear recommendation — allow, review, or block. The entire integration takes about 5 minutes using Guzzle or cURL.
Does Fidro have a PHP SDK?
Fidro doesn't require an SDK. It's a standard REST API that works with any HTTP client in PHP, including Guzzle, cURL, or PHP's built-in file_get_contents with stream contexts. Just send a POST request and decode the JSON response.
Is Fidro free to use with PHP?
Yes, Fidro offers a free plan with 1,000 validations per month, no credit card required. It works with any PHP application, whether you're using Laravel, Symfony, WordPress, or vanilla 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