<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
error_reporting(E_ALL);
header("Content-type: application/json; charset=utf-8");

$query = $_GET['query'];

include_once('src/whois.main.php');
include_once('src/whois.utils.php');

$whois = new Whois();

$allowproxy = true;

$whois->deep_whois = true;

$whois->non_icann = true;

$result = $whois->Lookup($query);

echo json_encode($result,JSON_PRETTY_PRINT);
