So I'm writing an api that my clients can use in their sites. I don't want to give them direct access to the code.
I have the script on api.XXXXXX.com
index.php contains:
<?php
require_once('base.php');
require_once('client.php');
class api extends client {
function __construct($config = null) {
return parent::__construct($config);
}
}
//....Other Code
?>
Is it possible for my clients to access the API class by including it in their site?
For example:
<?php
require_once('http://api.XXXXXX.com/index.php');
class service{
private $client;
function __construct() {
$this->client = new api();
}
}
//....Other Code
?>