mawdoo3com/copyleaks-integration

This is unofficial SDK package for Copyleaks integration

dev-main 2020-12-26 19:20 UTC

This package is auto-updated.

Last update: 2024-04-27 02:09:10 UTC


README

This is unofficial SDK package for copyleaks.com integration To install this package:

composer require mawdoo3com/copyleaks-integration

Usage:

<?php

require_once __DIR__ . "/vendor/autoload.php";

use MWCopyleaks\Authentication;
use MWCopyleaks\Scan;

try {
    $auth = new Authentication(ACCOUNT_EMAIL, API_KEY);
    $token = $auth->getAccessToken();
    $scan = new Scan($token);
    $text = 'Your plain text';
    $body_base64 = base64_encode($text);
    $scan_id = uniqid();
    $scan->scanByFile($body_base64, 'filename.txt', 'https://domain.com/webhook/{STATUS}/'.$scan_id, $scan_id, true);
} catch (\Exception $ex) {
    
}