1. Go to this page and download the library: Download mcstutterfish/cloudflare 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/ */
mcstutterfish / cloudflare example snippets
use Cloudflare;
use Cloudflare\Zone\Dns;
// Create a connection to the Cloudflare API which you can
// then pass into other services, e.g. DNS, later on
$client = new Cloudflare\Api('[email protected]', 'API_KEY');
// Create a new DNS record
$dns = new Cloudflare\Dns($client);
$dns->create('12345678901234567890', 'TXT', '127.0.0.1', 120);
use Cloudflare;
// Create a connection to the Cloudflare API which you can
// then pass into other services, e.g. DNS, later on
$dns = new Cloudflare\Zone\Dns('[email protected]', 'API_KEY');
$dns->create('12345678901234567890', 'TXT', '127.0.0.1', 120);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.