PHP code example of sunsetboy / security-service-sdk

1. Go to this page and download the library: Download sunsetboy/security-service-sdk 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/ */

    

sunsetboy / security-service-sdk example snippets


use SecurityServiceClient\SecurityServiceClient;

$securityServiceClient = new SecurityServiceClient('api-key');

// Log user login
$suspicionScore = $securityServiceClient->logUserLogin(42, '1.1.1.1', 'Mozilla 123');

// Fetch logins of users 1 and 2 (you can only fetch users of your company)

$logins = $securityServiceClient->fetchUsersLogins([1, 2]);