bsobbe / ithenticate Goto Github PK
View Code? Open in Web Editor NEWA library to use Ithenticate API easier and faster, to check and prevent plagiarism
License: MIT License
A library to use Ithenticate API easier and faster, to check and prevent plagiarism
License: MIT License
Submitting a login request to the iThenticate API with a blank username/password returns a response with a 500 status and no sid. iThenticate API documentation states that 401 is returned when no sid can be generated. Given this inconsistency, might we adapt the login method to throw an Exception on 500 or even any non 200 status?
There is an error message in the response I'm getting that actually spells out the fact that username and pass are required, so that could be used as an alternative signal of failure to login.
Dear Sam,
I understand that bsobbe/iThenticate requires php7 but excludes php8. It seems to me that the issue is due to the use of phpxmlrpc 4.0. In fact, compose.json states "phpxmlrpc/phpxmlrpc": "4.0". I know that phpxmlrpc/phpxmlrpc is now updated to 4.6.1. As far as I know, php8 is not compatible with some php7 instructions (for example "each" operator), hence bsobbe/iThenticate is not compatible with php8. Have you got plans to port it to php8?
Secondarily, it would be super if bsobbe/iThenticate library could also include iThenticate user management. That means define a new user if not existing and share a folder to other users when necessary. We would like to know your view about it.
Thx a lot for you help.
Do you have a way to download ithenticate result with php?
Hi Sobhan,
I install your library, but it I could not use correctly.
sid response null
my code below,
<?php
include 'vendor/autoload.php';
use bsobbe\ithenticate\Ithenticate;
$ithenticate = new \bsobbe\ithenticate\Ithenticate("xxx", "xxx");
//The value in result variable is the document_id of the inserted document.
print_r($ithenticate);
$content=file_get_contents('./cloud-computing.txt', FILE_USE_INCLUDE_PATH);
$result = $ithenticate->submitDocument(
"Cloud Computing",
"Sobhan",
"Bagheri",
"cloud-computing.txt", //File name from the object of the uploaded temp file.
$content, //Document content fetched with php file_get_contents() function from the document file.
239091 //Folder number to store document (You can get folder number from last part of ithenticate panel URL).
);
?>
When I run php page, I'm getting response.
sid is null
[root@emy]# php index.php
XML-RPC: PhpXmlRpc\Helper\XMLParser::xmlrpc_ee: invalid value received in DATETIME: 2018-03-29T09:00:58Z
bsobbe\ithenticate\Ithenticate Object
(
[url:bsobbe\ithenticate\Ithenticate:private] => https://api.ithenticate.com/rpc
[username:bsobbe\ithenticate\Ithenticate:private] => xxx
[password:bsobbe\ithenticate\Ithenticate:private] => xxx
[sid:bsobbe\ithenticate\Ithenticate:private] =>
)
XML-RPC: PhpXmlRpc\Helper\XMLParser::xmlrpc_ee: invalid value received in DATETIME: 2018-03-29T09:00:58Z
directory list
[root@emy]# ll
total 20
-rw-r--r-- 1 root root 3635 Mar 29 11:45 cloud-computing.txt
-rw-r--r-- 1 root root 61 Mar 29 11:44 composer.json
-rw-r--r-- 1 root root 4218 Mar 29 11:44 composer.lock
-rw-r--r-- 1 root root 800 Mar 29 11:49 index.php
drwxr-xr-x 5 root root 73 Mar 29 11:44 vendor
[root@emy]# ll vendor/
total 4
-rw-r--r-- 1 root root 178 Mar 29 11:44 autoload.php
drwxr-xr-x 3 root root 25 Mar 29 11:44 bsobbe
drwxr-xr-x 2 root root 203 Mar 29 11:44 composer
drwxr-xr-x 3 root root 23 Mar 29 11:44 phpxmlrpc
composer.json
{
"require": {
"bsobbe/ithenticate": "*"
}
}
I tried to login using this package but it's not working.
I used same credentials on Ithenticate web and it works.
I tried this:
$ithenticate = new Ithenticate("My username", "My password");
But when I do dd($ithenticate)
, result given is "false"
Hi @bsobbe!
I'll come back soon with a PR to update the reference URL (the linked reference is outdated) and also fix the issue I had when creating a folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.