Skip to content

Copyleaks is online plagiarism detector. Use Copyleaks to find out who used your online content. This repository exemplify how to integrate with Copyleaks cloud to detect copyright infringement.

eladbitton/.NET-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copyleaks SDK

Copyleaks SDK is a simple framework that allows you to perform plagiarism scans and track content distribution around the web, using Copyleaks cloud.

With Copyleaks SDK you can submit for scan:

  • Webpages
  • Local files (see supported files here)
  • OCR (Optical Character Recognition) - scanning pictures containing textual content (see supported files here)
Instructions for using the SDK are below. For a quick example demonstrating the SDK capabilities just look at the code examples under “examples”.

Configuration

You can configure Copyleaks SDK in one of two ways:

  1. Download the code from here, compile it and add reference to the assembly.
  2. Add CopyleaksAPI NuGet by running the following command in the Package Manager Console
  3. Install-Package CopyleaksAPI
    

Signing Up and Getting Your API Key

To use Copyleaks API you need to be a registered user. Signing up is free of charge.

Signup to Copyleaks and confirm your account by clicking the link on the confirmation email. To get your API key, click your username in the upper right corner which will lead you to ‘Manage Account’ page. Press on "Generate" to get your own personal API key.

For more information check out our API guide.

Example

This code will show you where the textual content in the parameter ‘url’ has been used online:

using System;
using System.Threading;
using Copyleaks.SDK.API;
// ...

private static void Scan(string username, string apiKey, string url) { Console.Write("User login... "); LoginToken token = UsersAuthentication.Login(username, apiKey);// Login to Copyleaks server. This security token can be use multiple times, untill it will be expired (14 days). Console.WriteLine("\t\t\tSuccess!");

Console.Write("Submiting new request... ");
Detector detector = new Detector(token);
ScannerProcess process = detector.CreateByUrl(new Uri(url));// Create a new process on server.
Console.WriteLine("\tSuccess!");


Console.Write("Waiting for completion... ");
    while (!process.IsCompleted())
    Thread.Sleep(1000);// Waiting to process to be finished.
Console.WriteLine("\tSuccess!");


Console.Write("Getting results... ");
    var results = process.GetResults();// Getting results.
    if (results.Length == 0)
{
    Console.WriteLine("\tNo results.");
}
    else
{
    for (int i = 0; i < results.Length; ++i)
    {
        Console.WriteLine();
        Console.WriteLine("Result {0}:", i + 1);
        Console.WriteLine("Url: {0}", results[i].URL);
        Console.WriteLine("Precents: {0}", results[i].Precents);
        Console.WriteLine("CopiedWords: {0}", results[i].NumberOfCopiedWords);
    }
}

}

Dependencies:

Referenced Assemblies:

Read More

About

Copyleaks is online plagiarism detector. Use Copyleaks to find out who used your online content. This repository exemplify how to integrate with Copyleaks cloud to detect copyright infringement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published