API systems

General information

API (application programming interface) is intended for automatic transformation of your content into content, protected by improved protection.

How it works?

Conversion of page content occurs by the formation of POST-requests.

An example of working with the API using PHP and the CURL library

		
/*
 * Setting the data necessary to convert content to a secure page block "on the wing":
 * @api_key - Your API-key. You can get it on your profile Cabinet In the "Advanced Protection" tab (Required parameter)
 * @content - Source code block in HTML format (Required parameter)
 * @user_agent - Should always be $_SERVER["HTTP_USER_AGENT"] (Required parameter)
 * @apply_coding(boolean) - Apply HTML encoding. Default true
 * @special_style(string) - Apply a special font to protect against text recognition programs (not required parameter)
 * Available fonts are:
 * > PaladinRus, a_BosaNovaDcFr, Bad Script, SS_Adec2.0_main, Clip Condensed, London, Minecraft Rus, Bolero script,
 * > DS Stamper, a_CampusOtl3DShad, Kontanter Bold, Blaze, Equestria_Cyrillic, Tusch Touch 3, SkogenSpelFont
 */
$page_block = array();
$page_block['api_key'] = "n254xpbpyst61i6qv11h30d9vl0d9a41-6f4922f45568161a8cdf4ad2299f6d23-f11b9498f944b35adfc7aa2839168b56-...";
$page_block['content'] = "

Who owns the information, he owns the world. Bill Gates

"; $page_block['user_agent'] = $_SERVER["HTTP_USER_AGENT"]; $page_block['special_style'] = "Clip Condensed"; // Generating a URL-coded query string $post_query = http_build_query($page_block); // Initialization curl $curl = curl_init(); //Actoin "remove" indicates that you need to remove a block from the system $action = 'fly'; // Address to send the request curl_setopt($curl, CURLOPT_URL, "https://site-content-protection.com/api/" . $action); // Data transmission by POST method curl_setopt($curl, CURLOPT_POST, 1); // Passing the parameters required to create a page block curl_setopt($curl, CURLOPT_POSTFIELDS, $post_query); // Do not print data to the browser curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // The request is curl - referring to the serverSCP // We get the resulting array in json format, in which the error element stores an error code, and the content element is a copy-protected HTML page block $answer = curl_exec($curl); $result = json_decode($answer, true); if ($result['error'] == 0) { echo $result['content']; } else { echo "You have an error: " . $result['error']; } curl_close($curl);
Return Error API-Codes
Code Description
0 No error
1 Required parameter not sent
2 No site found with the specified API key

If you have some problems using API please getsupport.