PHP code example of 99designs / sipht

1. Go to this page and download the library: Download 99designs/sipht 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/ */

    

99designs / sipht example snippets


$client = new Sift\Client('my-api-key');

$event = new Sift\Event(array(
    '$type' => Sift\Event::TYPE_TRANSACTION,
    '$user_id' => '1234',
    // ...
));

$event = Sift\Event::transactionEvent(array(
    '$user_id' => '1234',
    // ...
));

$response = $client->postEvent($event);

// Label a user as fraudulent, optionally specifying reason codes and an explanation:
$reasons = array(Sift\Label::REASON_SPAM);
$label = Sift\Label::bad($reasons, 'User engaged in phishing attack')

// Alternatively, correct a false positive by labelling a user as non-fraudulent:
$good = Sift\Label::good('Mistakenly identified as fraudulent');

$response = $client->labelUser('some-user-id', $label);

$score = $client->userScore('some-user-id');