Giter VIP home page Giter VIP logo

cloudflare-getzones's Introduction

cloudflare-getzones

Get all zone information for every domain in your CloudFlare account using curl and php

Required Prerequisites

  • A webserver running php
  • CloudFlare account
  • CloudFlare API key
  • php-curl

If you are getting the error 'cURL not installed or available' and are running a Ubuntu server, all you need to do is install curl for php. Centos should already have curl compiled with php by default

sudo apt-get install php5-curl

You will need to restart the webserver afterwards:

sudo service apache2 restart

Installation

git clone [email protected]:AlphaRecon19/cloudflare-getzones.git

Now that you have cloudflare-getzones you will need to edit 2 variables in index.php $cloudflare_tkn and $cloudflare_email with your information from https://www.cloudflare.com/my-account page.

Once you have made you changes above everything should just work. There will be a dropdown with all of you domains in your account.

Everything after line 98 is not required for this to function, it is just here to show the you data that has been received and processed from CloudFlare and can be deleted

Usage

All the data from CloudFlare is store in the array $zones and can be used like this

<?php
echo $zones['example.com']['zone_id'];
?>

The above code would show the zone_id for example.com providing that example.com is in your account.

Error Handling

Please refer to the CloudFlare Client API Documentation located at https://www.cloudflare.com/docs/client-api.html if you get a error.

cloudflare-getzones's People

Contributors

alpharecon19 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.