How to implement Fingerprinting API in a Simple PHP Script

Prerequisites

Step 1 : Script example

<?php
$apiKey = "your_api_key"; // Replace with your API key
$apiUrl = "https://api.fingerprinting-api.com/visitors";

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Authorization: Bearer $apiKey"
));

// Execute request
$response = curl_exec($ch);
curl_close($ch);

// Convert JSON response to PHP array
$data = json_decode($response, true);

echo "<pre>";
print_r($data);
echo "</pre>

Step 2 : test your script

Save the file and open it in a browser:

This will display user fingerprinting data in JSON format.

This is an example of how you can implement our solution with a simple PHP script. Depending of your need, you will need to adapt your script. If you need help regarding your deployment, don't hesitate to reach out

Feb 24, 2025

Latest posts

Discover other pieces of writing in our blog

Fingerprinting.API

Advanced browser fingerprinting for seamless security

© Copyright 2024. All rights reserved.

Fingerprinting.API

Advanced browser fingerprinting for seamless security

© Copyright 2024. All rights reserved.