Skip to content

How to purge cloudflare single file in PHP?

1function getZones($key, $email, $page = 1, $per_page = 100) {
  $cmd = 'curl -s -X GET "https://api.cloudflare.com/client/v4/zones?'.
        'status=active&page=$page&per_page=$per_page&order=status&direction=desc&match=all" -H "X-Auth-Email: '.$email.
        '" -H "X-Auth-Key: '.$key.
        '" -H "Content-Type: application/json"';
  return json_decode(shell_exec($cmd));
}  
2
3
4
5
6
7
See also  Python code snippet - How to add methods to manuplate the model in serializers?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.