Created
October 5, 2013 14:11
-
-
Save florinel-chis/6841366 to your computer and use it in GitHub Desktop.
purge file on cloudflare
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ]; then | |
echo "Usage: $0 http://your.domain.com/url" | |
exit 0 | |
fi | |
#get this from Account section in Cloudflare | |
TOKEN="YOUR_TOKEN_HERE" | |
EMAIL="YOUR_EMAIL_HERE" | |
DOMAIN="YOUR_DOMAIN_HERE" | |
curl https://www.cloudflare.com/api_json.html \ | |
-d "a=zone_file_purge" \ | |
-d "tkn=$TOKEN" \ | |
-d "email=$EMAIL" \ | |
-d "z=$DOMAIN" \ | |
-d "url=$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment