1. Go to this page and download the library: Download proxycheck/proxycheck-php 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/ */
proxycheck / proxycheck-php example snippets
// Get your visitors IP address or email address
// If you're using CloudFlare change $_SERVER["REMOTE_ADDR"] to $_SERVER["HTTP_CF_CONNECTING_IP"]
// You may also supply an array of addresses in $address to check multiple addresses at once.
$address = $_SERVER["REMOTE_ADDR"];
// Input your options for this query including your optional API Key and query flags.
$proxycheck_options = array(
'API_KEY' => '######-######-######-######', // Your API Key.
'ASN_DATA' => 1, // Enable ASN data response.
'DAY_RESTRICTOR' => 7, // Restrict checking to proxies seen in the past # of days.
'VPN_DETECTION' => 1, // Check for both VPN's and Proxies instead of just Proxies.
'RISK_DATA' => 1, // 0 = Off, 1 = Risk Score (0-100), 2 = Risk Score & Attack History.
'INF_ENGINE' => 1, // Enable or disable the real-time inference engine.
'TLS_SECURITY' => 0, // Enable or disable transport security (TLS).
'QUERY_TAGGING' => 1, // Enable or disable query tagging.
'MASK_ADDRESS' => 1, // Anonymises the local-part of an email address (e.g. [email protected])
'CUSTOM_TAG' => '', // Specify a custom query tag instead of the default (Domain+Page).
'BLOCKED_COUNTRIES' => array('Wakanda', 'WA'), // Specify an array of countries or isocodes to be blocked.
'ALLOWED_COUNTRIES' => array('Azeroth', 'AJ') // Specify an array of countries or isocodes to be allowed.
);
$result_array = \proxycheck\proxycheck::check($address, $proxycheck_options);
if ( $result_array['block'] == "yes" ) {
// Example of a block and the reason why.
echo "Blocked, reason: " . $result_array['block_reason'];
exit;
} else {
// No Proxy / VPN / Blocked Country detected.
echo "Not blocked.";
}
$proxycheck_options = array(
'API_KEY' => '', // Your API Key.
'TLS_SECURITY' => 0, // Enable or disable transport security (TLS).
'STAT_SELECTION' => 'usage', // Stats to view: detections, usage or queries
'LIMIT' => '10', // Specify how many entries to view (applies to detection stats only)
'OFFSET' => '0' // Specify an offset in the entries to view (applies to detection stats only)
);
$result_array = \proxycheck\proxycheck::stats($proxycheck_options);
$proxycheck_options = array(
'API_KEY' => '', // Your API Key.
'TLS_SECURITY' => 0, // Enable or disable transport security (TLS).
'LIST_SELECTION' => 'whitelist', // Specify the list you're accessing: CORS, whitelist or blacklist
'LIST_ACTION' => 'add', // Specify an action: list, add, remove, set or clear.
'LIST_ENTRIES' => array('8.8.8.8', '1.1.1.1/24', 'AS888') // Origins, IPs, Ranges, ASN's or Emails to be added, removed or set
);
$result_array = \proxycheck\proxycheck::listing($proxycheck_options);
bash
composer
'LIST_ENTRIES' => array('8.8.8.8 #this is google')
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.