1. Go to this page and download the library: Download jacyimp/cloud-ip-detector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jacyimp / cloud-ip-detector example snippets
use JacyImp\CloudIpDetector\CloudIpDetector;
use JacyImp\CloudIpDetector\Provider;
$detector = new CloudIpDetector();
$detector->detectOne('104.16.10.20');
// Provider::Cloudflare
use JacyImp\CloudIpDetector\CloudIpDetectorInterface;
final class RequestClassifier
{
public function __construct(
private readonly CloudIpDetectorInterface $detector,
) {
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.