AlphaRecon19 / Cloudflare-PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare-PHP

Scrutinizer Code Quality

A simple PHP Library that allows you to interact with Cloudflare's API using guzzle. More information about endpoints can be found here.

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.

Alternatively, if this is not an option you can just pass these variables into the Cloudflare class when you create it.

$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());

About

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%