pricing background

PHP API Integration

api

live

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=live&domainName=google.com");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);

Historical

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=historical&domainName=google.com");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);

Reverse

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=reverse&keyword=youtube");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);

Bulk Whois

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/bulkwhois?apiKey=API_KEY");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"domainNames": ["amazon.ch","google.com","whoisfreaks.com","nic.dev","news.si"]}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);