PHP code example of conservationafrica / darwin-client
1. Go to this page and download the library: Download conservationafrica/darwin-client 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/ */
conservationafrica / darwin-client example snippets
declare(strict_types=1);
use Darwin\HttpClient;
use Http\Client\Curl\Client as CurlClient;
use Laminas\Diactoros\RequestFactory;
use Laminas\Diactoros\StreamFactory;
use Lcobucci\Clock\SystemClock;
$client = new HttpClient(
'https://your-subdomain.eecsoftware.com',
'/AJAX/', // <- Whilst this is probably the same for all installations, you still need to specify it.
'Some shared secret', // <- This is provided by the vendor
99, // <- The company Identifier, supplied by the vendor
new SystemClock(new DateTimeZone('UTC')), // Some Psr\Clock\ClockInterface implementation
new CurlClient(), // <- Any Psr 18 compliant HTTP client
new RequestFactory(), // <- Any Psr 17 compliant request factory
new StreamFactory(), // <- Any Psr 17 compliant stream factory
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.