1. Open your client - side file and paste that code in your <HEAD> section.

< script > 
    //some default pre init 
    var XCopy = XCopy || {}; 
    XCopy.q = XCopy.q || []; 

    //provide xcopy initialization parameters 
    XCopy.app_key = 'YOUR APPKEY '; 

    XCopy.url = 'http://app.xcopy.co'; 

    var apikey; 

    var checked = false; 

    function check() 
    { 
        var xhr = new XMLHttpRequest(); 
        apikey = document.getElementById('apikey').value; 
        xhr.open('POST', 'SERVER PATH HERE', true);    
        var params = {'apikey':apikey}; 
        xhr.onreadystatechange = function(){ 
            if (xhr.readyState != 4) return;    
            if (this.readyState == 4) { 
                if (this.status == 200) 
                {    
                IF (this.responseText=='1') 
                { 
                //SHOW YOUR TEXT 
                //In our case we just show the "maintext" div 
                document.getElementById("divapikey").style.display='none'; 
                document.getElementById("maintext").style.display='block'; 
                } 
                } 
                }; 
                xhr.send(JSON.stringify(params)); 
        }             

    (function() { 
        var xcp = document.createElement('script'); xcp.type = 'text/javascript'; 
        xcp.async = true; 
        //enter url of script here 
        xcp.src = 'xcopy.min.js'; 
        xcp.onload = function(){XCopy.init()}; 
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(xcp, s); 
    })(); 

< /script >

Replace 'YOUR APPKEY' with APPKEY, taken from app.xcopy.co dashboard and 'SERVER ' with your server host.

Replace "SHOW YOUR TEXT" with any kind of showing the main text - css, JS, JQuery, AJAX, etc...

In our example - we simple hide the "maintext" block with text. That kind, of course, is not very secure.

2. Goto your <BODY> section and find where your text is shown:

For example you have such code:

    < div id="maintext" width="600" style="display:none;"> 
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. 
    In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. 
    Aenean imperdiet 
    </div >

Insert the following code just above your text div code:

    <div id="divapikey" > 
    <input id='apikey' placeholder='Enter your apikey here'></input><br/> 
    <button type='submit' id='checkapi' onclick='check();'>check key</button>    
    <button id='getapi' onclick='window.open(\"http://signup.xcopy.co\")'>Get Api Key</button> 
    </div>

That's all for the client part. Of course you may call all variables, finctions, tags in anyway.

Moreover, you can place it in any place of your page, at any moment - depends on your fantasy.

3. Open your server part file, that was pointed at "SERVER PATH HERE".

Add the following code to that file :

    <?php $json = file_get_contents('php://input'); 
    $obj = json_decode($json, true); 
    $apikey = $obj['apikey']; $page=""; 
    if ((!isset($apikey))||(is_null($apikey))) 
    { $response = '0'; } 
    else 
    { $response = file_get_contents("http://app.xcopy.co/o/check?apikey=".$apikey); } 
    echo $response; ?>

THAT'S ALL!!!