Identify Key Intelligence on an IP Address in PHP

Cloudmersive
2 min readJan 11, 2021

--

Did you know that an IP address can be used to identify more than just the physical location of a user? It can also indicate if the user/IP is a known threat, bot, Tor exit node, or other malicious non-user entity. The following API leverages geolocation technology and an up-to-date database of various online threats to gather key intelligence on a specific IP address.

First, run this command to install the SDK package:

composer require cloudmersive/cloudmersive_validate_api_client

Then, you can call the function:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
$apiInstance = new Swagger\Client\Api\IPAddressApi(


new GuzzleHttp\Client(),
$config
);
$value = "value_example"; // string | IP address to process, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
try {
$result = $apiInstance->iPAddressIpIntelligence($value);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling IPAddressApi->iPAddressIpIntelligence: ', $e->getMessage(), PHP_EOL;
}
?>

The successful process will return location information (including coordinates, time zone, zip code, and more), as well as information on any threat that may be present. Our hope is that this multi-purpose API will be a valuable addition to your business, whenever the need arises. Retrieve your free API key from the Cloudmersive website to gain access to 800 monthly calls across our multitude of APIs.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet