Coder Social home page Coder Social logo

bsobbe / ithenticate Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 17.0 33 KB

A library to use Ithenticate API easier and faster, to check and prevent plagiarism

License: MIT License

PHP 100.00%
api api-client crossref crossref-api ithenticate php php-library php7 plagiarism plagiarism-checker plagiarism-checking plagiarism-detection plagiarism-prevention xmlrpc

ithenticate's People

Contributors

asmecher avatar bsobbe avatar djolemc avatar idimopoulos avatar jonasraoni avatar phroggar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ithenticate's Issues

Handling 500 response from API

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.

Php 8 and pull requests

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.

sid response null

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": "*"
    }
}

Login not working

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"

Failing to create folder

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.