PHP code example of camoo / hosting

1. Go to this page and download the library: Download camoo/hosting library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

camoo / hosting example snippets


use Camoo\Hosting\Modules\Domains;
 
 // set your token salt for the local cache.
 // you can visit this link https://api.wordpress.org/secret-key/1.1/salt/ to pickup one
 define('ACCESS_TOKEN_SALT', 'Your super secret Key here');
 
 // SET your CAMOO.HOSTING creadentials
 define('cm_email', '[email protected]');
 define('cm_passwd', '2BSe3@pMRbCnV>J(G');
 
 $oDomain = new Domains();
 $oResponse = $oDomain->checkAvailability('example', 'cm');
 // Get Entity
 var_dump($oResponse->getEntity());

 // OR get Array instead of entity
 var_dump($oResponse->getJson());