Jump to content

CloudFlare Workflow


Recommended Posts

Hi all,

 

I had a quick search round, but couldn't find anything that would enable me to use the CloudFlare API with Alfred, so I made my own with PHP using vexxhost's PHP CloudFlare API (https://github.com/vexxhost/CloudFlare-API).

 

So far it allows you to:

  • Purge full site cache
  • Purge single file
  • Put site into developer mode
  • Whitelist/Blacklist/Unlist an IP
  • Get a 24 hours stats readout
  • Get a list of all domains on your account
  • Get a list of DNS records for a domain
  • Add/Edit/Delete DNS records

I'll probably finish it off over the weekend and get the rest of the CloudFlare API (https://www.cloudflare.com/docs/client-api.html) working with it too, the above are keeping me happy for now though. I'll also get it on Github shortly, but for now it can be downloaded at https://ed.gs/assets/alfred/CloudFlare.alfredworkflow.

 

You'll need to change the API key and email in the class_cloudflare.php, just open the workflow to get to the folder. Your API key can be found at https://www.cloudflare.com/my-account.

 

Feel free to let me know of any bugs, things like adding and editing SRV records might be a bit flakey. I'm a PHP novice so I did my best :)

 

Cheers,

Ed

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...