PHP code example of arraypress / wp-ipqualityscore

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


use ArrayPress\IPQualityScore\Client;

$client = new Client( $api_key );

$ip    = $client->check_ip( $order->ip );
$email = $client->validate_email( $order->email );

if ( is_wp_error( $ip ) || is_wp_error( $email ) ) {
	return; // Do not lose an order to somebody else's downtime.
}

if ( $ip->is_proxy() || $email->is_disposable() ) {
	$order->flag_for_review();
}

$client->set_strictness( 1 );