Cloudflare-PHP
, (*1)
A simple PHP Library that allows you to interact with Cloudflare's API using guzzle.
More information about endpoints can be found here., (*2)
Authentication
Information required to connect to Cloudflare's API are your API Key and Email,
these can be found in your My Account page within cloudflare.
This by default is stored in the Cloudflare.yml file located in the root of
your project. You can just copy the Cloudflare.yml.dist file replacing your
credentials there., (*3)
Alternatively, if this is not an option you can just pass these variables into
the Cloudflare class when you create it., (*4)
$APIKey = "1234567893feefc5f0q5000bfo0c38d90bbeb";
$Email = "example@example.com";
$Cloudflare = new Cloudflare\Cloudflare($APIKey, $Email);
Example - Getting users details
<?php
require 'vendor/autoload.php';
$Cloudflare = new Cloudflare\Cloudflare();
$User = new Cloudflare\User($Cloudflare);
var_dump($User->get());