How to use Fense
Fense is a versatile security service that offers features like blocking proxies, VPNs, Tor networks, geolocation blocking, and referrer-based blocking. By integrating Fense directly into your website, you can take full advantage of its capabilities and enhance your website's protection.
Don't use WordPress?
No problem! If your website is based on other CMS like Laravel, pure PHP, CakePHP or others, you can use Fense without any problem. Here's a complete guide of how you can add Fense protection to your website.
Choose your preferred language below:
API Response
Get information about any IP and check if it's a proxy or not
https://api.fense.in/API_TOKEN/[IP address]Example: Good IP
Scanning a clean IP using Google's DNS (8.8.8.8)
https://api.fense.in/API_TOKEN/8.8.8.8"proxy": "no" meaning this IP is clean and safe.{ "status": "success", "ip": "8.8.8.8", "hostname": "dns.google", "city": "Mountain View", "region": "California", "country": "US", "lang": "English", "loc": "37.4056,-122.0775", "org": "AS15169 Google LLC", "proxy": "no" }Example: Bad IP
Scanning a known proxy IP (178.212.54.161)
https://api.fense.in/API_TOKEN/178.212.54.161"proxy": "yes" meaning this IP is a proxy and should be blocked.{ "status": "success", "ip": "178.212.54.161", "hostname": "178-212-54-161.lss.net.pl", "city": "Midzyrzecz", "region": "Lubusz", "country": "PL", "lang": "English", "loc": "52.4388,15.5677", "org": "", "proxy": "yes" }PHP Integration
Use this code for any PHP-based framework. If you can create your own code, feel free to do that.
Using cURL
cURL<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.fense.in/API_TOKEN/[IP address]", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }Using Guzzle
Guzzle<?php $client = new \GuzzleHttp\Client(); $response = $client->request('GET', 'https://api.fense.in/API_TOKEN/[IP address]'); echo $response->getBody();Python Integration
Use this code for any Python project. If you can create your own code, feel free to do that.
import requests url = "https://api.fense.in/API_TOKEN/[IP address]" response = requests.get(url, headers=headers) print(response.json())JavaScript Integration
Use this code for any JavaScript-based framework. If you can create your own code, feel free to do that.
Using Axios
Axiosimport axios from 'axios'; const options = { method: 'GET', url: 'https://api.fense.in/API_TOKEN/[IP address]' }; try { const response = await axios.request(options); console.log(response.data); } catch (error) { console.error(error); }Using jQuery
jQueryconst settings = { async: true, crossDomain: true, url: 'https://api.fense.in/API_TOKEN/[IP address]', method: 'GET' }; $.ajax(settings).done(function (response) { console.log(response); });Using Fetch
Fetchconst url = 'https://api.fense.in/API_TOKEN/[IP address]'; const options = { method: 'GET' }; try { const response = await fetch(url, options); const result = await response.text(); console.log(result); } catch (error) { console.error(error); }