1. Go to this page and download the library: Download bsobbe/ithenticate 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/ */
bsobbe / ithenticate example snippets
use bsobbe\ithenticate\Ithenticate;
$ithenticate = new Ithenticate("Your username", "Your password");
$ithenticate = new \bsobbe\ithenticate\Ithenticate("username", "password");
//The value in result variable is the document_id of the inserted document.
$result = $ithenticate->submitDocument(
"Cloud Computing",
"Sobhan",
"Bagheri",
"CloudComputingEssay.pdf", //File name from the object of the uploaded temp file.
$content, //Document content fetched with php file_get_contents() function from the document file.
649216 //Folder number to store document (You can get folder number from last part of ithenticate panel URL).
);
$ithenticate = new \bsobbe\ithenticate\Ithenticate("username", "password");
$result = $ithenticate->documentGetRequest(12345);
// Since we are requesting 1 document, there should be 1 document only in the response.
$document = reset($result['documents']);
$is_pending = $document['is_pending']; // If the report is pending.
$document_id = $document['id'];
$processed_time = $document['processed_time']; // The time the report has been created.
$percent_match = $document['percent_match']; // The percentage match for the document.
$title = $document['title']; // The submitted title of the document.
$uploaded_time = $document['uploaded_time']; // The time the document was uploaded.
// Also, $document['folder'] is available containing information related to the folder that the document is submitted
// into.