Validate and Identify IP Address Intelligence in C#

Cloudmersive
2 min readJan 11, 2021

--

Creating a secure information environment for your business and clients has become increasingly challenging during this era of evolving technology. Since every computer you connect with has an IP address, this is a common form of infiltration into a network. To ensure that the IP addresses you interact with are safe, you can use the following API to not only identify know threat IPs, bots, and Tor exit nodes, but also identify location information.

First, we need to install the SDK. Please note that we have both .NET Framework and .NET Core available, but the below instructions will detail .NET Framework only.

Install-Package Cloudmersive.APIClient.NET.ImageRecognition -Version 3.0.3

Next, we can call the function with the following code:

using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.ImageRecognition.Api;
using Cloudmersive.APIClient.NET.ImageRecognition.Client;
using Cloudmersive.APIClient.NET.ImageRecognition.Model;
namespace Example
{
public class FaceLocateExample
{
public void main()
{
// Configure API key authorization: Apikey
Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
var apiInstance = new FaceApi();
var imageFile = new System.IO.FileStream("C:\\temp\\inputfile", System.IO.FileMode.Open); // System.IO.Stream | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
try
{
// Detect and find faces in an image
FaceLocateResponse result = apiInstance.FaceLocate(imageFile);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FaceApi.FaceLocate: " + e.Message );
}
}
}
}

This will give you a prompt response detailing the safety status and location of the IP address. Check out the Cloudmersive website to retrieve your API key! This will also give you access to 800 monthly calls across our library 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