<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/geolocation?apiKey=API_KEY&ip=8.8.8.8");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/geolocation?apiKey=API_KEY");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"ips":["1.1.1.1","2.2.2.2","8.8.8.8"]}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);