PHP code example of nimbusec / nimbusec-php

1. Go to this page and download the library: Download nimbusec/nimbusec-php 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/ */

    

nimbusec / nimbusec-php example snippets



Nimbusec\API as API;

// put code in here
...



// Include autoloader to load Nimbusec API automatically.
et credentials.
$NIMBUSEC_KEY = "YOUR KEY";
$NIMBUSEC_SECRET = "YOUR SECRET";

// Create a Nimbusec API client instance.
// The default URL parameter can be omitted.
$api = new API($NIMBUSEC_KEY, $NIMBUSEC_SECRET, API::DEFAULT_URL);

try {
    // Fetch domains.
    $domains = $api->findDomains();
    foreach ($domains as $domain) {
        echo $domain["name"] . "\n";
    }

} catch (Exception $e) {
    echo "[x] an error occured: {$e->getMessage()}\n";
}
bash
# Local installation
php composer.phar hp
bash
composer update nimbusec/nimbusec-php
bash
git clone https://github.com/cumulodev/nimbusec-php cumulodev/nimbusec-php
cd cumulodev/nimbusec-php
composer update