Skip to content

Instantly share code, notes, and snippets.

@jbma
Created June 10, 2015 07:16
Show Gist options
  • Save jbma/59c32a71c355988f8719 to your computer and use it in GitHub Desktop.
Save jbma/59c32a71c355988f8719 to your computer and use it in GitHub Desktop.
<?php
function zarza_custom_clear_cache(){
$ch = curl_init("https://192.198.89.58");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PURGE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$output = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
}
add_action( 'after_rocket_clean_file', zarza_custom_clear_cache );
add_action( 'after_rocket_clean_domain', zarza_custom_clear_cache );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment