PHP code example of arraypress / wp-proxycheck

1. Go to this page and download the library: Download arraypress/wp-proxycheck 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/ */

    

arraypress / wp-proxycheck example snippets


use ArrayPress\ProxyCheck\Client;

$client = new Client( $api_key );
$result = $client->check_ip( $ip );

if ( is_wp_error( $result ) ) {
	return; // An API failure is not a reason to lose the order.
}

if ( $result->is_proxy() || $result->is_vpn() ) {
	$order->flag_for_review( $result->get_risk_score() );
}

if ( $client->check_email( $email )->is_disposable() ) {
	// ...
}