Php script for purge all files api

Hello,
I am aware about purge all files api doc - Cloudflare API v4 Documentation, but I am searching for help/example about how to run this api within a php file.
Thanks in advance.
Leandro

That goes beyond help with Cloudflare. I run in ColdFusion so I don’t have php examples to share. I do have some pho experience and can get it done. But someone else will probably chime in.

I’ll give you a tip though. If you use the dev mode through api, you can immediately send the purge command too. Saves you headaches!

Hi Jules,
thanks for your tip.
Have a great weekend!
Leandro

I’m not a developer and APIs mystify me. For that very reason, I ended up installing Postman so that I could run a few commands that are either unavailable or not practical on the GUI.

The beauty of Postman is that, after you properly configure a request, it can then generate that same request in many, many programming languages, including PHP.

You can get Postman here

And here you’ll find, at the very end of the page, a collection of Cloudflare API requests to be used with Postman:

https://support.cloudflare.com/hc/en-us/articles/115002323852-Using-Cloudflare-API-with-Postman-Collections

Hello floripare,

thanks for your message.

I will take a look at getpostman.com.

Thank You

1 Like