You are having this problem when making the ajax request:
Blocked cross-origin request: Same origin policy (Same
Origin Policy) prevents reading the remote resource on
http://license.fullprog.com/api/151519343520180105. (Reason: the
CORS header 'Access-Control-Allow-Origin' is not present).
Basically, there is a lock when making an ajax request for a different domain from which the script is running. To resolve this problem you must enable access from other Ominos in your api. No Mozilla mdn has some examples of how to allow, from the simplest to the fullest.
A basic solution would be to allow access for anyone by adding a header at the top of each file that can be accessed. Something like this:
<?php
//acesso a parti de qualquer dominio
header('Access-Control-Allow-Origin: *');
//acesso a partir de um dominio especifico
//header('Access-Control-Allow-Origin: http://dominio.com');
That should solve some of your problems. For more complete control you can limit which http methods are able to access (GET, POST, PUT, DELETE, etc). In practice you should only return these access control headers when, when the browser makes a request with the method HTTP OPTIONS. So you could do this check like this (in every file, or in your front controller):
if($_SERVER['REQUEST_METHOD'] == "OPTIONS") {
//dominios permitidos, use * para permitir qualquer um
header('Access-Control-Allow-Origin: http://dominio.com');
//metodo http permitidos
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header("Content-Length: 0");
header("Content-Type: text/plain");
exit(0);
}