PHPackages                             matasarei/strike-plagiarism-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. matasarei/strike-plagiarism-php

ActiveLibrary[API Development](/categories/api)

matasarei/strike-plagiarism-php
===============================

StrikePlagiarism API for PHP

2.0.1(3w ago)09MITPHPPHP ^7.4 || ^8.0CI passing

Since May 14Pushed 3w ago1 watchersCompare

[ Source](https://github.com/grinchenkoedu/strike-plagiarism-php)[ Packagist](https://packagist.org/packages/matasarei/strike-plagiarism-php)[ RSS](/packages/matasarei-strike-plagiarism-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

StrikePlagiarism API v2 client for PHP
======================================

[](#strikeplagiarism-api-v2-client-for-php)

[![Tests](https://github.com/grinchenkoedu/strike-plagiarism-php/actions/workflows/tests.yml/badge.svg)](https://github.com/grinchenkoedu/strike-plagiarism-php/actions/workflows/tests.yml)[![PHP version](https://camo.githubusercontent.com/4a5057a857cdb86cf011d334f86b1bbf627728435b1bce61d0859516874ee5f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e342d3838393242462e737667)](https://php.net/)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

An **unofficial** StrikePlagiarism API v2 client.

How to install
--------------

[](#how-to-install)

This is a [composer](https://getcomposer.org/doc/00-intro.md) package, to install simply run:

```
composer require matasarei/strike-plagiarism-php

```

How to use
----------

[](#how-to-use)

```
use Matasar\StrikePlagiarism\Client;
use Matasar\StrikePlagiarism\Document;

$client = new Client('YOUR_API_KEY');

$document = new Document(
    'en', // language code (ISO 639-1)
    'A test document', // title
    'Yevhen Matasar', // author
    'Yevhen Matasar', // coordinator
    __DIR__ . '/test.pdf' // file uri
);

// Optional: Add specific metadata and configuration
$document->setCallbackUrl('https://your-site.com/webhook');
$document->setAiDetection(true);
$document->setGrammarCheck(true);
$document->setUserId('student-123');

$response = $client->addDocument($document);

// Fetch the report as a DTO (use `true` for a short report)
$report = $client->getReport($response['id'], short: false);
```

The content of `$report` will be an instance of the `Matasar\StrikePlagiarism\Report` class, which provides convenient getters for the API's JSON response, for example:

```
echo $report->getId(); // "12345-abcde"
echo $report->getStatus(); // "success"
echo $report->getSimilarity1(); // 10.5
echo $report->getSimilarity2(); // 0.0
echo $report->getTitle(); // "A test document"
echo $report->getAuthor(); // "Yevhen Matasar"
echo $report->getCoordinator(); // "Yevhen Matasar"

// To access any other properties from the raw response:
$status = $report->get('status');

// Or to get the entire raw JSON response as an array:
$rawData = $report->toArray();

// If you need the raw HTML report directly (as a string) instead of JSON:
$htmlString = $client->getReportHtml($response['id']);

// You can also fetch the report as a PDF:
$pdfString = $client->getReportPdf($response['id']);
```

### Webhooks (Callbacks)

[](#webhooks-callbacks)

When a document finishes processing, the API can send a notification to your `callbackUrl`. You can parse this easily:

```
use Matasar\StrikePlagiarism\CallbackWebhook;

$payload = file_get_contents('php://input');
$webhook = new CallbackWebhook($payload);

if ($webhook->isCompleted()) {
    $reportId = $webhook->getDocumentId();
    // fetch report...
}
```

### Other Endpoints

[](#other-endpoints)

The client supports many other operations out of the box:

```
$client->rejectDocument('doc-id');
$client->sendForCorrection('doc-id');
$client->getProtocols('doc-id');

// Add/remove from reference database
$client->addToReferences('doc-id');
$client->removeFromReferences('doc-id');
$client->removeDocument('doc-id');
```

Tests
-----

[](#tests)

To run tests locally, you can use Docker. Tests are mocked and do not make actual API requests.

1. Install dependencies using Docker: ```
    docker run --rm -v $(pwd):/app -w /app composer:latest composer install
    ```
2. Run PHPUnit using Docker: ```
    docker run --rm -v $(pwd):/app -w /app composer:latest vendor/bin/phpunit
    ```

###  Health Score

42

↑

FairBetter than 88% of packages

Maintenance96

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~585 days

Total

3

Last Release

21d ago

Major Versions

1.0.0 → 2.0.02026-07-26

PHP version history (2 changes)1.0.0PHP &gt;=7.2

2.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/44632227efd38dd8598ceb71812e223865e994f1f35f027b423469133fb29d6b?d=identicon)[matasarei](/maintainers/matasarei)

---

Top Contributors

[![matasarei](https://avatars.githubusercontent.com/u/6638367?v=4)](https://github.com/matasarei "matasarei (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matasarei-strike-plagiarism-php/health.svg)

```
[![Health](https://phpackages.com/badges/matasarei-strike-plagiarism-php/health.svg)](https://phpackages.com/packages/matasarei-strike-plagiarism-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k54](/packages/neuron-core-neuron-ai)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)[volcengine/volcengine-php-sdk

119.5k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
