Skip to content

Instantly share code, notes, and snippets.


Constantin Boulanger Sinepel

View GitHub Profile
Sinepel / purge_cf.php
Created Apr 20, 2021 — forked from Greg-Boggs/purge_cf.php
PHP code to Purge Cloudflare Cache
View purge_cf.php
// Replace EMAIL/API_KEY/ZONE_ID with your details.
// Zone ID is on the dashboard for the domain in the bottom right.
// Api keys are generated from the account settings. You must give cache purge permissions
// Place this script on your webserver and point a Github Webhook at it, and you'll clear
// the Cloudflare cache every time you do a push to GH.
try {
$head = [];
$head[] = 'Content-Type: application/json';
Sinepel / openssl_encrypt_decrypt.php
Created Aug 2, 2019 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
View openssl_encrypt_decrypt.php
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
* @return string