Created
June 10, 2015 07:16
-
-
Save jbma/59c32a71c355988f8719 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?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